Spaces:
Running
on
Zero
Running
on
Zero
Update app.
Browse files
app.py
CHANGED
@@ -180,13 +180,15 @@ def generate(image, video, first_run, state, state_, textbox_in, dtype=torch.flo
|
|
180 |
text_en_out = text_en_out.split('#')[0]
|
181 |
textbox_out = text_en_out
|
182 |
|
|
|
|
|
183 |
show_images = ""
|
184 |
if os.path.exists(image):
|
185 |
-
filename = save_image_to_local(image)
|
186 |
-
show_images += f'<img src="./file={
|
187 |
if os.path.exists(video):
|
188 |
-
filename = save_video_to_local(video)
|
189 |
-
show_images += f'<video controls playsinline width="500" style="display: inline-block;" src="./file={
|
190 |
|
191 |
if flag:
|
192 |
state.append_message(state.roles[0], textbox_in + "\n" + show_images)
|
|
|
180 |
text_en_out = text_en_out.split('#')[0]
|
181 |
textbox_out = text_en_out
|
182 |
|
183 |
+
print(image, video)
|
184 |
+
|
185 |
show_images = ""
|
186 |
if os.path.exists(image):
|
187 |
+
# filename = save_image_to_local(image)
|
188 |
+
show_images += f'<img src="./file={image}" style="display: inline-block;width: 250px;max-height: 400px;">'
|
189 |
if os.path.exists(video):
|
190 |
+
# filename = save_video_to_local(video)
|
191 |
+
show_images += f'<video controls playsinline width="500" style="display: inline-block;" src="./file={video}"></video>'
|
192 |
|
193 |
if flag:
|
194 |
state.append_message(state.roles[0], textbox_in + "\n" + show_images)
|