alexkueck commited on
Commit
9ce214a
1 Parent(s): 2f732e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -441,10 +441,10 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
441
  #buffer = io.BytesIO()
442
  #image.save(buffer, format='PNG')
443
  #desiredObject = buffer.getbuffer()
 
 
444
 
445
- print("image:.................")
446
-
447
- history[-1][1] = "<img src='data:image/png;base64,{image}'/>" #file.name,
448
  print("history zeichnen......................")
449
  print(history)
450
  if shared_state.interrupted:
 
441
  #buffer = io.BytesIO()
442
  #image.save(buffer, format='PNG')
443
  #desiredObject = buffer.getbuffer()
444
+ b = BytesIO()
445
+ image.save(b, format='PNG')
446
 
447
+ history[-1][1] = "<img src='data:image/png;base64,{0}'/>".format(b64encode(b.getvalue()).decode('utf-8')) #file.name,
 
 
448
  print("history zeichnen......................")
449
  print(history)
450
  if shared_state.interrupted: