alexkueck commited on
Commit
13a146b
1 Parent(s): 101ea82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -136,7 +136,7 @@ os.environ["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
136
  ##############################################
137
  #wenn löschen Button geklickt
138
  def clear_all():
139
- return gr.File(visible=False), gr.Image(visible=False)
140
 
141
  ##############################################
142
  #History - die Frage oder das File eintragen...
@@ -155,7 +155,7 @@ def add_text(chatbot, history, prompt, file):
155
  ############################################
156
  #nach dem Upload soll das zusätzliche Fenster mit dem image drinnen angezeigt werden
157
  def file_anzeigen(file):
158
- return gr.Image(label = None, width=15, visible=True, interactive = False, object_fit="scale-down", height=20, rows=1, comulms=1, min_width=20, scale = 1), file, file
159
 
160
  ##########################################
161
  #Hilfsfunktion, um ein von Stable Diffusion erzeugtes Bild für die Ausgabe in der History vorzubereiten
@@ -573,7 +573,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
573
  cancelBtn = gr.Button("Stop")
574
  with gr.Row():
575
  file_display = gr.File(visible=False)
576
- image_display = gr.Image( visible=False)
577
  upload = gr.UploadButton("📁", file_types=["image", "video", "audio"], scale = 20)
578
  emptyBtn = gr.ClearButton([user_input, chatbot, history, file_display, image_display], value="🧹 Neue Session", scale=20)
579
 
 
136
  ##############################################
137
  #wenn löschen Button geklickt
138
  def clear_all():
139
+ return gr.File(visible=False), gr.Gallery(visible=False)
140
 
141
  ##############################################
142
  #History - die Frage oder das File eintragen...
 
155
  ############################################
156
  #nach dem Upload soll das zusätzliche Fenster mit dem image drinnen angezeigt werden
157
  def file_anzeigen(file):
158
+ return gr.Gallery(label = None, width=15, visible=True, interactive = False, object_fit="scale-down", height=20, rows=1, comulms=1, min_width=20, scale = 1), file, file
159
 
160
  ##########################################
161
  #Hilfsfunktion, um ein von Stable Diffusion erzeugtes Bild für die Ausgabe in der History vorzubereiten
 
573
  cancelBtn = gr.Button("Stop")
574
  with gr.Row():
575
  file_display = gr.File(visible=False)
576
+ image_display = gr.Gallery( visible=False)
577
  upload = gr.UploadButton("📁", file_types=["image", "video", "audio"], scale = 20)
578
  emptyBtn = gr.ClearButton([user_input, chatbot, history, file_display, image_display], value="🧹 Neue Session", scale=20)
579