Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -277,14 +277,12 @@ def simple_chat(message: dict, temperature: float = 0.8, max_length: int = 4096,
|
|
277 |
conversation = []
|
278 |
|
279 |
if "file" in message and message["file"]:
|
280 |
-
|
281 |
-
# Leer el archivo recibido
|
282 |
-
file_contents = io.BytesIO(file).read()
|
283 |
choice, contents = mode_load(file_contents)
|
284 |
if choice == "image":
|
285 |
conversation.append({"role": "user", "image": contents, "content": message["text"]})
|
286 |
elif choice == "doc":
|
287 |
-
format_msg = contents + "\n\n\n" + "{} files uploaded.\n".format(
|
288 |
conversation.append({"role": "user", "content": format_msg})
|
289 |
else:
|
290 |
conversation.append({"role": "user", "content": message["text"]})
|
|
|
277 |
conversation = []
|
278 |
|
279 |
if "file" in message and message["file"]:
|
280 |
+
file_contents = message["file"]
|
|
|
|
|
281 |
choice, contents = mode_load(file_contents)
|
282 |
if choice == "image":
|
283 |
conversation.append({"role": "user", "image": contents, "content": message["text"]})
|
284 |
elif choice == "doc":
|
285 |
+
format_msg = contents + "\n\n\n" + "{} files uploaded.\n".format("1") + message["text"]
|
286 |
conversation.append({"role": "user", "content": format_msg})
|
287 |
else:
|
288 |
conversation.append({"role": "user", "content": message["text"]})
|