google_colab_ipynb's Introduction
google_colab_ipynb's People
google_colab_ipynb's Issues
`summarize_text` fails when running `colab_notebook_YouTube_transcription.ipynb` on longer videos
For example, on the video with id EW5ezacJa_U
, the following error is observed
---------------------------------------------------------------------------
InvalidRequestError Traceback (most recent call last)
[<ipython-input-20-f0a75f3a603a>](https://localhost:8080/#) in <cell line: 2>()
52
53 # call the summarize_text function and append the result to the summary variable
---> 54 r = summarize_text(m, lang)
55 summary += r
56
5 frames
[/usr/local/lib/python3.9/dist-packages/openai/api_requestor.py](https://localhost:8080/#) in _interpret_response_line(self, rbody, rcode, rheaders, stream)
681 stream_error = stream and "error" in resp.data
682 if stream_error or not 200 <= rcode < 300:
--> 683 raise self.handle_error_response(
684 rbody, rcode, resp.data, rheaders, stream_error=stream_error
685 )
InvalidRequestError: This model's maximum context length is 4097 tokens. However, your messages resulted in 28280 tokens. Please reduce the length of the messages.
The root cause of the error seems to be that split_article
relies on existence of punctuation in transcribed text, which may not be the case with zh content. It may be desireable to integrate native zh segmentation models such as Jieba, CKIP, or monpa to achieve initial segmentation to limit the tokens sent to ChatGPT.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.