Coder Social home page Coder Social logo

google_colab_ipynb's Introduction

Ling-Jyh Chen's Github Page ๐Ÿ‘‹

LJ

LJ Stats

GitHub Streak

Ling-Jyh's GitHub stats

Top Langs

google_colab_ipynb's People

Contributors

cclljj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.