Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ object_detection_pipeline = pipeline("object-detection", model="facebook/detr-re
|
|
46 |
video_classification_pipeline = pipeline("video-classification", model="facebook/timesformer-base-finetuned-k400")
|
47 |
# Removed text_to_3d_pipeline as it was causing issues
|
48 |
# Removed Keypoint Detection Pipeline
|
49 |
-
|
50 |
summarization_pipeline = pipeline("summarization", model="facebook/bart-large-cnn")
|
51 |
text_to_audio_pipeline = pipeline("text-to-speech", model="julien-c/ljspeech_tts_train_tacotron2_raw_phn_tacotron_g2p_en_no_space")
|
52 |
audio_classification_pipeline = pipeline("audio-classification", model="facebook/wav2vec2-base")
|
@@ -113,10 +113,6 @@ def video_classification(video):
|
|
113 |
result = video_classification_pipeline(video)
|
114 |
return result
|
115 |
|
116 |
-
def translate_text(text):
|
117 |
-
result = translation_pipeline(text)
|
118 |
-
return result[0]["translation_text"]
|
119 |
-
|
120 |
def summarize_text(text):
|
121 |
result = summarization_pipeline(text)
|
122 |
return result[0]["summary_text"]
|
@@ -197,12 +193,6 @@ with gr.Blocks() as demo:
|
|
197 |
|
198 |
# Removed Text-to-3D tab as it was causing issues
|
199 |
# Removed Keypoint Detection tab due to issues.
|
200 |
-
with gr.Tab("Translation"):
|
201 |
-
translate_text_text = gr.Textbox(label="Text")
|
202 |
-
translate_text_generate = gr.Button("Translate")
|
203 |
-
translate_text_output = gr.Textbox(label="Translated Text")
|
204 |
-
|
205 |
-
translate_text_generate.click(translate_text, inputs=translate_text_text, outputs=translate_text_output)
|
206 |
|
207 |
with gr.Tab("Summarization"):
|
208 |
summarize_text_text = gr.Textbox(label="Text")
|
|
|
46 |
video_classification_pipeline = pipeline("video-classification", model="facebook/timesformer-base-finetuned-k400")
|
47 |
# Removed text_to_3d_pipeline as it was causing issues
|
48 |
# Removed Keypoint Detection Pipeline
|
49 |
+
# Removed Translation pipeline as it was causing issues
|
50 |
summarization_pipeline = pipeline("summarization", model="facebook/bart-large-cnn")
|
51 |
text_to_audio_pipeline = pipeline("text-to-speech", model="julien-c/ljspeech_tts_train_tacotron2_raw_phn_tacotron_g2p_en_no_space")
|
52 |
audio_classification_pipeline = pipeline("audio-classification", model="facebook/wav2vec2-base")
|
|
|
113 |
result = video_classification_pipeline(video)
|
114 |
return result
|
115 |
|
|
|
|
|
|
|
|
|
116 |
def summarize_text(text):
|
117 |
result = summarization_pipeline(text)
|
118 |
return result[0]["summary_text"]
|
|
|
193 |
|
194 |
# Removed Text-to-3D tab as it was causing issues
|
195 |
# Removed Keypoint Detection tab due to issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
with gr.Tab("Summarization"):
|
198 |
summarize_text_text = gr.Textbox(label="Text")
|