parthb3 commited on
Commit
a199db5
·
1 Parent(s): 36056cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, from_pt=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,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)