alexkueck commited on
Commit
760663c
1 Parent(s): 85f4369

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -423,6 +423,7 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
423
  if (prompt.find('Bild zeichnen') != -1):
424
  response = requests.post(API_URL, headers=HEADERS, json=data)
425
  result = response.content
 
426
  else:
427
  result = llm_chain(llm, history_text_und_prompt)
428
 
@@ -432,7 +433,7 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
432
 
433
 
434
  if (prompt.find('Bild zeichnen') != -1):
435
- history[-1][1] = result
436
  return history, "Stop: Success"
437
  else:
438
  #Antwort als Stream ausgeben... wenn Textantwort gefordert
 
423
  if (prompt.find('Bild zeichnen') != -1):
424
  response = requests.post(API_URL, headers=HEADERS, json=data)
425
  result = response.content
426
+ image = Image.open(io.BytesIO(result))
427
  else:
428
  result = llm_chain(llm, history_text_und_prompt)
429
 
 
433
 
434
 
435
  if (prompt.find('Bild zeichnen') != -1):
436
+ history[-1][1] = image
437
  return history, "Stop: Success"
438
  else:
439
  #Antwort als Stream ausgeben... wenn Textantwort gefordert