Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,13 +16,13 @@ model_od.to("cuda:0")
|
|
16 |
|
17 |
@spaces.GPU
|
18 |
def bot_streaming(message, history, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
19 |
-
print(message)
|
20 |
if message.files:
|
21 |
image = message.files[-1].path
|
22 |
else:
|
23 |
# if there's no image uploaded for this turn, look for images in the past turns
|
24 |
# kept inside tuples, take the last one
|
25 |
for hist in history:
|
|
|
26 |
if type(hist[0])==tuple:
|
27 |
image = hist[0][-1].path
|
28 |
|
|
|
16 |
|
17 |
@spaces.GPU
|
18 |
def bot_streaming(message, history, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
|
|
19 |
if message.files:
|
20 |
image = message.files[-1].path
|
21 |
else:
|
22 |
# if there's no image uploaded for this turn, look for images in the past turns
|
23 |
# kept inside tuples, take the last one
|
24 |
for hist in history:
|
25 |
+
print(hist)
|
26 |
if type(hist[0])==tuple:
|
27 |
image = hist[0][-1].path
|
28 |
|