ClownRat commited on
Commit
b76f6c0
•
1 Parent(s): 7e442ac

Update app.

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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={filename}" style="display: inline-block;width: 250px;max-height: 400px;">'
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={filename}"></video>'
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)