Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ def get_summary(audio_text):
|
|
97 |
tokenizer = AutoTokenizer.from_pretrained(llm_model) # set tockenizer
|
98 |
|
99 |
from transformers import pipeline
|
100 |
-
summarizer = pipeline("summarization", model=llm_model,
|
101 |
|
102 |
model_max_tokens = tokenizer.model_max_length # get max tockens model can process
|
103 |
text_tokens = len(tokenizer.tokenize(audio_text)) # get number of tockens in audio text
|
@@ -207,4 +207,4 @@ with gr.Blocks() as demo:
|
|
207 |
sum_btn.click(fn=get_video, inputs=url, outputs=video, api_name="get_youtube_video", queue=False)
|
208 |
|
209 |
demo.queue()
|
210 |
-
demo.launch()
|
|
|
97 |
tokenizer = AutoTokenizer.from_pretrained(llm_model) # set tockenizer
|
98 |
|
99 |
from transformers import pipeline
|
100 |
+
summarizer = pipeline("summarization", model=llm_model, from_tf=True) # set summarizer
|
101 |
|
102 |
model_max_tokens = tokenizer.model_max_length # get max tockens model can process
|
103 |
text_tokens = len(tokenizer.tokenize(audio_text)) # get number of tockens in audio text
|
|
|
207 |
sum_btn.click(fn=get_video, inputs=url, outputs=video, api_name="get_youtube_video", queue=False)
|
208 |
|
209 |
demo.queue()
|
210 |
+
demo.launch(share=False)
|