Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -140,12 +140,17 @@ class Pipeline:
|
|
140 |
return text
|
141 |
return text
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
title = "LaViLa"
|
144 |
description = """LaViLa (**L**anguage **a**ugmented **Vi**deo **La**nguage Pretraining) is a new approach to learning video representations from Large Language Models (LLMs). We repurpose LLMs to be visually conditioned "Narrators", and use them to automatically generate video-language paired data. We use this data to then learn a video-langauge representation, outperforming prior work by large margins. \nGradio Demo for LaVila. To use it, simply upload your video, or click one of the examples to load them. Read more at the links below."""
|
145 |
article = "<p style='text-align: center'><a href='https://github.com/facebookresearch/LaViLa' target='_blank'>Github Repo</a> | <a href='https://arxiv.org/abs/2212.04501' target='_blank'>Paper on arxiv</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=nateraw_lavila' alt='visitor badge'></center></p>"
|
146 |
|
147 |
interface = gr.Interface(
|
148 |
-
|
149 |
inputs=[
|
150 |
gr.Video(label='video_path'),
|
151 |
gr.Slider(0.0, 1.0, 0.7, label='temperature'),
|
|
|
140 |
return text
|
141 |
return text
|
142 |
|
143 |
+
|
144 |
+
pipeline = Pipeline()
|
145 |
+
def fn(video_path, temperature=0.7, top_p=0.95, max_text_length=77, num_return_sequences=10):
|
146 |
+
return pipeline(video_path, temperature, top_p, max_text_length, num_return_sequences)
|
147 |
+
|
148 |
title = "LaViLa"
|
149 |
description = """LaViLa (**L**anguage **a**ugmented **Vi**deo **La**nguage Pretraining) is a new approach to learning video representations from Large Language Models (LLMs). We repurpose LLMs to be visually conditioned "Narrators", and use them to automatically generate video-language paired data. We use this data to then learn a video-langauge representation, outperforming prior work by large margins. \nGradio Demo for LaVila. To use it, simply upload your video, or click one of the examples to load them. Read more at the links below."""
|
150 |
article = "<p style='text-align: center'><a href='https://github.com/facebookresearch/LaViLa' target='_blank'>Github Repo</a> | <a href='https://arxiv.org/abs/2212.04501' target='_blank'>Paper on arxiv</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=nateraw_lavila' alt='visitor badge'></center></p>"
|
151 |
|
152 |
interface = gr.Interface(
|
153 |
+
fn,
|
154 |
inputs=[
|
155 |
gr.Video(label='video_path'),
|
156 |
gr.Slider(0.0, 1.0, 0.7, label='temperature'),
|