Spaces:
Running
Running
gradio 4.44
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.44.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
llm.py
CHANGED
@@ -54,11 +54,11 @@ class LLM:
|
|
54 |
lastTypeHuman = False
|
55 |
|
56 |
user_msg_parts = []
|
57 |
-
if message
|
58 |
-
user_msg_parts.append({"text": message
|
59 |
-
if message
|
60 |
-
for file in message
|
61 |
-
user_msg_parts.extend(self._process_file(file
|
62 |
|
63 |
if user_msg_parts:
|
64 |
messages.append({"role": "user", "content": user_msg_parts})
|
|
|
54 |
lastTypeHuman = False
|
55 |
|
56 |
user_msg_parts = []
|
57 |
+
if message["text"]:
|
58 |
+
user_msg_parts.append({"text": message["text"]})
|
59 |
+
if message["files"]:
|
60 |
+
for file in message["files"]:
|
61 |
+
user_msg_parts.extend(self._process_file(file["path"]))
|
62 |
|
63 |
if user_msg_parts:
|
64 |
messages.append({"role": "user", "content": user_msg_parts})
|