Update app.py
Browse files
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 |
|