Update app.py
Browse files
app.py
CHANGED
|
@@ -438,9 +438,13 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
|
|
| 438 |
if (prompt.find('zeichnen') != -1):
|
| 439 |
#Bild ausgeben
|
| 440 |
image = Image.open(io.BytesIO(result))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
print("image:.................")
|
| 442 |
-
print(
|
| 443 |
-
history[-1][1] =
|
| 444 |
print("history zeichnen......................")
|
| 445 |
print(history)
|
| 446 |
if shared_state.interrupted:
|
|
|
|
| 438 |
if (prompt.find('zeichnen') != -1):
|
| 439 |
#Bild ausgeben
|
| 440 |
image = Image.open(io.BytesIO(result))
|
| 441 |
+
buffer = io.BytesIO()
|
| 442 |
+
image.save(buffer, format='PNG')
|
| 443 |
+
desiredObject = buffer.getbuffer()
|
| 444 |
+
buffer.close()
|
| 445 |
print("image:.................")
|
| 446 |
+
print(desiredObject)
|
| 447 |
+
history[-1][1] = desiredObject #file.name,
|
| 448 |
print("history zeichnen......................")
|
| 449 |
print(history)
|
| 450 |
if shared_state.interrupted:
|