suayptalha commited on
Commit
654211c
·
verified ·
1 Parent(s): 4dff0d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -51,9 +51,12 @@ def chat_with_text(user_message, max_new_tokens=250):
51
  return assistant_reply
52
 
53
  # Resim ve/veya metin tabanlı sohbet fonksiyonu
54
- def bot_streaming(message, max_new_tokens=250):
55
  global history
56
 
 
 
 
57
  user_message = message.get("text", "")
58
  image = message.get("image", None)
59
 
 
51
  return assistant_reply
52
 
53
  # Resim ve/veya metin tabanlı sohbet fonksiyonu
54
+ def bot_streaming(message, history=None, max_new_tokens=250):
55
  global history
56
 
57
+ if history is None: # Eğer `history` verilmemişse global `history`yi kullan
58
+ history = []
59
+
60
  user_message = message.get("text", "")
61
  image = message.get("image", None)
62