Spaces:
Runtime error
Runtime error
storresbusquets
commited on
Commit
·
4a20ca6
1
Parent(s):
b2ed0d8
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ class GradioInference():
|
|
10 |
self.current_size = "base"
|
11 |
self.loaded_model = whisper.load_model(self.current_size)
|
12 |
self.yt = None
|
13 |
-
self.summarizer = pipeline("summarization", model="
|
14 |
|
15 |
# Initialize VoiceLabT5 model and tokenizer
|
16 |
self.keyword_model = T5ForConditionalGeneration.from_pretrained("Voicelab/vlt5-base-keywords")
|
@@ -92,7 +92,7 @@ with block as demo:
|
|
92 |
keywords = gr.Textbox(label="Keywords", placeholder="Keywords Output", lines=5).style(show_copy_button=True, container=True)
|
93 |
label = gr.Label(label="Sentiment Analysis")
|
94 |
with gr.Row().style(equal_height=True):
|
95 |
-
clear = gr.ClearButton([
|
96 |
btn = gr.Button("Get video insights") # Updated button label
|
97 |
btn.click(gio, inputs=[link, lang, size], outputs=[text, summary, keywords, label])
|
98 |
link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
|
@@ -110,7 +110,7 @@ with block as demo:
|
|
110 |
# summary = gr.Textbox(label="Summary", placeholder="Summary Output", lines=5)
|
111 |
# keywords = gr.Textbox(label="Keywords", placeholder="Keywords Output", lines=5)
|
112 |
with gr.Row().style(equal_height=True):
|
113 |
-
clear = gr.ClearButton([
|
114 |
btn = gr.Button("Get video insights") # Updated button label
|
115 |
btn.click(transcribe_audio, inputs=[audio_file], outputs=[text])
|
116 |
# link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
|
|
|
10 |
self.current_size = "base"
|
11 |
self.loaded_model = whisper.load_model(self.current_size)
|
12 |
self.yt = None
|
13 |
+
self.summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
|
14 |
|
15 |
# Initialize VoiceLabT5 model and tokenizer
|
16 |
self.keyword_model = T5ForConditionalGeneration.from_pretrained("Voicelab/vlt5-base-keywords")
|
|
|
92 |
keywords = gr.Textbox(label="Keywords", placeholder="Keywords Output", lines=5).style(show_copy_button=True, container=True)
|
93 |
label = gr.Label(label="Sentiment Analysis")
|
94 |
with gr.Row().style(equal_height=True):
|
95 |
+
clear = gr.ClearButton([link, title, img, text, summary, keywords, label])
|
96 |
btn = gr.Button("Get video insights") # Updated button label
|
97 |
btn.click(gio, inputs=[link, lang, size], outputs=[text, summary, keywords, label])
|
98 |
link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
|
|
|
110 |
# summary = gr.Textbox(label="Summary", placeholder="Summary Output", lines=5)
|
111 |
# keywords = gr.Textbox(label="Keywords", placeholder="Keywords Output", lines=5)
|
112 |
with gr.Row().style(equal_height=True):
|
113 |
+
clear = gr.ClearButton([text])
|
114 |
btn = gr.Button("Get video insights") # Updated button label
|
115 |
btn.click(transcribe_audio, inputs=[audio_file], outputs=[text])
|
116 |
# link.change(gio.populate_metadata, inputs=[link], outputs=[img, title])
|