Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,15 @@ def stream_chat(message: Dict[str, str], history: list):
|
|
38 |
# {'text': 'continue?', 'files': []}
|
39 |
# [[('image-xxx.jpg',), None], ['what is this', 'a image.']]
|
40 |
|
|
|
41 |
image_path = None
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
if len(history) != 0 and isinstance(history[0][0], tuple):
|
46 |
image_path = history[0][0][0]
|
|
|
38 |
# {'text': 'continue?', 'files': []}
|
39 |
# [[('image-xxx.jpg',), None], ['what is this', 'a image.']]
|
40 |
|
41 |
+
files = message.get('files', [])
|
42 |
image_path = None
|
43 |
+
|
44 |
+
if files:
|
45 |
+
image_path = files[0]['path']
|
46 |
+
|
47 |
+
# image_path = None
|
48 |
+
# if len(message.files) != 0:
|
49 |
+
# image_path = message.files[0].path
|
50 |
|
51 |
if len(history) != 0 and isinstance(history[0][0], tuple):
|
52 |
image_path = history[0][0][0]
|