Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -386,8 +386,8 @@ def generate_auswahl(prompt, file, history, rag_option, model_option, openai_api
|
|
386 |
result = response.content
|
387 |
#Bild ausgeben
|
388 |
image = Image.open(io.BytesIO(result))
|
389 |
-
|
390 |
-
history[-1][1] = "<img src='data:image/png;base64,{0}'/>".format(b64encode(
|
391 |
print("history zeichnen......................")
|
392 |
print(history)
|
393 |
return history, "Success"
|
@@ -434,7 +434,7 @@ def generate_text (prompt, file, history, rag_option, model_option, openai_api_k
|
|
434 |
if (file == None):
|
435 |
history_text_und_prompt = generate_prompt_with_history(prompt, history)
|
436 |
else:
|
437 |
-
history_file_und_prompt =
|
438 |
|
439 |
#history für HuggingFace Models formatieren
|
440 |
#history_text_und_prompt = generate_prompt_with_history_hf(prompt, history)
|
|
|
386 |
result = response.content
|
387 |
#Bild ausgeben
|
388 |
image = Image.open(io.BytesIO(result))
|
389 |
+
image_64 = umwandeln_fuer_anzeige(image)
|
390 |
+
history[-1][1] = "<img src='data:image/png;base64,{0}'/>".format(b64encode(image_64).decode('utf-8'))
|
391 |
print("history zeichnen......................")
|
392 |
print(history)
|
393 |
return history, "Success"
|
|
|
434 |
if (file == None):
|
435 |
history_text_und_prompt = generate_prompt_with_history(prompt, history)
|
436 |
else:
|
437 |
+
history_file_und_prompt = generate_prompt_with_history(prompt, file, history)
|
438 |
|
439 |
#history für HuggingFace Models formatieren
|
440 |
#history_text_und_prompt = generate_prompt_with_history_hf(prompt, history)
|