Update app.py
Browse files
app.py
CHANGED
|
@@ -41,10 +41,10 @@ def read_video_pyav(container, indices):
|
|
| 41 |
frames.append(frame)
|
| 42 |
return np.stack([x.to_ndarray(format="rgb24") for x in frames])
|
| 43 |
|
| 44 |
-
def chat(
|
| 45 |
# Download video from the hub
|
| 46 |
#video_path_1 = hf_hub_download(repo_id="raushan-testing-hf/videos-test", filename="sample_demo_1.mp4", repo_type="dataset")
|
| 47 |
-
video_path="/Users/aa469627/Desktop/videollama/scene/sample1-Scene-
|
| 48 |
#video_path_2 = hf_hub_download(repo_id="raushan-testing-hf/videos-test", filename="karate.mp4", repo_type="dataset")
|
| 49 |
|
| 50 |
container = av.open(video_path)
|
|
@@ -98,7 +98,7 @@ def chat(number,token):
|
|
| 98 |
|
| 99 |
demo = gr.Interface(
|
| 100 |
fn=chat,
|
| 101 |
-
inputs=[
|
| 102 |
outputs=["text"],
|
| 103 |
)
|
| 104 |
|
|
|
|
| 41 |
frames.append(frame)
|
| 42 |
return np.stack([x.to_ndarray(format="rgb24") for x in frames])
|
| 43 |
|
| 44 |
+
def chat(token):
|
| 45 |
# Download video from the hub
|
| 46 |
#video_path_1 = hf_hub_download(repo_id="raushan-testing-hf/videos-test", filename="sample_demo_1.mp4", repo_type="dataset")
|
| 47 |
+
video_path="/Users/aa469627/Desktop/videollama/scene/sample1-Scene-050.mp4"
|
| 48 |
#video_path_2 = hf_hub_download(repo_id="raushan-testing-hf/videos-test", filename="karate.mp4", repo_type="dataset")
|
| 49 |
|
| 50 |
container = av.open(video_path)
|
|
|
|
| 98 |
|
| 99 |
demo = gr.Interface(
|
| 100 |
fn=chat,
|
| 101 |
+
inputs=[gr.Slider(100,300)],
|
| 102 |
outputs=["text"],
|
| 103 |
)
|
| 104 |
|