akhaliq HF Staff commited on
Commit
bffe891
·
verified ·
1 Parent(s): 642f1c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -75,8 +75,9 @@ def chat_fn(message, chat_history, seed, randomize_seed, guidance_scale, steps,
75
  # Move model back to CPU to free GPU memory
76
  pipe = pipe.to("cpu")
77
  torch.cuda.empty_cache()
78
-
79
- return image
 
80
 
81
  # --- UI Definition using gr.ChatInterface ---
82
 
 
75
  # Move model back to CPU to free GPU memory
76
  pipe = pipe.to("cpu")
77
  torch.cuda.empty_cache()
78
+
79
+ # Return the image in the correct format for ChatInterface
80
+ return {"files": [image], "text": None}
81
 
82
  # --- UI Definition using gr.ChatInterface ---
83