Spaces:
Running on Zero
Running on Zero
update app
Browse files
app.py
CHANGED
|
@@ -155,7 +155,7 @@ def save_audio_temp(tensor, sample_rate):
|
|
| 155 |
# ---------------------------------------------------------
|
| 156 |
# Tab 1: Text Prompting (with Chunking)
|
| 157 |
# ---------------------------------------------------------
|
| 158 |
-
@spaces.GPU(duration=
|
| 159 |
def process_text_prompting(file_path, text_prompt, chunk_duration=DEFAULT_CHUNK_DURATION, progress=gr.Progress()):
|
| 160 |
global model, processor
|
| 161 |
|
|
@@ -236,7 +236,7 @@ def process_text_prompting(file_path, text_prompt, chunk_duration=DEFAULT_CHUNK_
|
|
| 236 |
# ---------------------------------------------------------
|
| 237 |
# Tab 2: Visual Prompting
|
| 238 |
# ---------------------------------------------------------
|
| 239 |
-
@spaces.GPU
|
| 240 |
def process_visual_prompting(video_file, visual_prompt_text, progress=gr.Progress()):
|
| 241 |
global model, processor, video_predictor
|
| 242 |
|
|
@@ -306,7 +306,7 @@ def process_visual_prompting(video_file, visual_prompt_text, progress=gr.Progres
|
|
| 306 |
# ---------------------------------------------------------
|
| 307 |
# Tab 3: Span Prompting (Temporal Anchors)
|
| 308 |
# ---------------------------------------------------------
|
| 309 |
-
@spaces.GPU
|
| 310 |
def process_span_prompting(audio_file, description, anchors_df, progress=gr.Progress()):
|
| 311 |
global model, processor
|
| 312 |
|
|
@@ -381,8 +381,8 @@ def process_span_prompting(audio_file, description, anchors_df, progress=gr.Prog
|
|
| 381 |
# Gradio Interface
|
| 382 |
# ---------------------------------------------------------
|
| 383 |
css = """
|
| 384 |
-
#main-title h1 {font-size: 2.
|
| 385 |
-
.gradio-container {max-width:
|
| 386 |
"""
|
| 387 |
|
| 388 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 155 |
# ---------------------------------------------------------
|
| 156 |
# Tab 1: Text Prompting (with Chunking)
|
| 157 |
# ---------------------------------------------------------
|
| 158 |
+
@spaces.GPU(duration=120)
|
| 159 |
def process_text_prompting(file_path, text_prompt, chunk_duration=DEFAULT_CHUNK_DURATION, progress=gr.Progress()):
|
| 160 |
global model, processor
|
| 161 |
|
|
|
|
| 236 |
# ---------------------------------------------------------
|
| 237 |
# Tab 2: Visual Prompting
|
| 238 |
# ---------------------------------------------------------
|
| 239 |
+
@spaces.GPU(duration=180)
|
| 240 |
def process_visual_prompting(video_file, visual_prompt_text, progress=gr.Progress()):
|
| 241 |
global model, processor, video_predictor
|
| 242 |
|
|
|
|
| 306 |
# ---------------------------------------------------------
|
| 307 |
# Tab 3: Span Prompting (Temporal Anchors)
|
| 308 |
# ---------------------------------------------------------
|
| 309 |
+
@spaces.GPU(duration=120)
|
| 310 |
def process_span_prompting(audio_file, description, anchors_df, progress=gr.Progress()):
|
| 311 |
global model, processor
|
| 312 |
|
|
|
|
| 381 |
# Gradio Interface
|
| 382 |
# ---------------------------------------------------------
|
| 383 |
css = """
|
| 384 |
+
#main-title h1 {font-size: 2.4em !important; text-align: center;}
|
| 385 |
+
.gradio-container {max-width: 1200px !important; margin: auto;}
|
| 386 |
"""
|
| 387 |
|
| 388 |
with gr.Blocks(css=css) as demo:
|