alexkueck commited on
Commit
b28dc03
1 Parent(s): a58886b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -137,7 +137,7 @@ def file_anzeigen(file):
137
  ext = analyze_file(file)
138
  print("ext...............................")
139
  print(ext)
140
- if (ext == "png" or ext == "PNG" or ext == "jpg" or ext == "jepg" or ext == "JPG" or ext == "JEPG"):
141
  return gr.Image(width=47, visible=True, interactive = False, height=47, min_width=47, show_label=False, show_share_button=False, show_download_button=False, scale = 0.5), file, file
142
  else:
143
  return gr.Image(width=47, visible=True, interactive = False, height=47, min_width=47, show_label=False, show_share_button=False, show_download_button=False, scale = 0.5), "data/file.png", file
@@ -231,7 +231,7 @@ def generate_auswahl(prompt, file, chatbot, history, rag_option, model_option, o
231
  #Es wurde ein Bild angehängt -> wenn prompt dazu, das Bild analysieren
232
  #geht nur über spezielle OpenAI-Schnittstelle...
233
  ext = analyze_file(file)
234
- if (ext == "png" or ext == "PNG" or ext == "jgp" or ext == "jepg"):
235
  result= generate_text_zu_bild(file, prompt, k, rag_option, chatbot)
236
  else:
237
  result = generate_text_zu_doc(file, prompt, k, rag_option, chatbot)
 
137
  ext = analyze_file(file)
138
  print("ext...............................")
139
  print(ext)
140
+ if (ext == "png" or ext == "PNG" or ext == "jpg" or ext == "jpeg" or ext == "JPG" or ext == "JPEG"):
141
  return gr.Image(width=47, visible=True, interactive = False, height=47, min_width=47, show_label=False, show_share_button=False, show_download_button=False, scale = 0.5), file, file
142
  else:
143
  return gr.Image(width=47, visible=True, interactive = False, height=47, min_width=47, show_label=False, show_share_button=False, show_download_button=False, scale = 0.5), "data/file.png", file
 
231
  #Es wurde ein Bild angehängt -> wenn prompt dazu, das Bild analysieren
232
  #geht nur über spezielle OpenAI-Schnittstelle...
233
  ext = analyze_file(file)
234
+ if (ext == "png" or ext == "PNG" or ext == "jpg" or ext == "jpeg" or ext == "JPG" or ext == "JPEG"):
235
  result= generate_text_zu_bild(file, prompt, k, rag_option, chatbot)
236
  else:
237
  result = generate_text_zu_doc(file, prompt, k, rag_option, chatbot)