Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ import torch
|
|
5 |
import os
|
6 |
import platform
|
7 |
import requests
|
|
|
|
|
8 |
|
9 |
model = ""
|
10 |
duration = None
|
@@ -133,6 +135,9 @@ elif mode == "image-to-text":
|
|
133 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
|
134 |
|
135 |
]
|
|
|
|
|
|
|
136 |
)
|
137 |
|
138 |
|
|
|
5 |
import os
|
6 |
import platform
|
7 |
import requests
|
8 |
+
from PIL import Image
|
9 |
+
|
10 |
|
11 |
model = ""
|
12 |
duration = None
|
|
|
135 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)")
|
136 |
|
137 |
]
|
138 |
+
|
139 |
+
url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg",
|
140 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
141 |
)
|
142 |
|
143 |
|