Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -233,24 +233,27 @@ def simple_chat(message, temperature: float = 0.8, max_length: int = 4096, top_p
|
|
| 233 |
format_msg = contents + "\n\n\n" + "{} files uploaded.\n" + message['text']
|
| 234 |
conversation.append({"role": "user", "content": format_msg})
|
| 235 |
else:
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
print(f"Conversation is -\n{conversation}")
|
| 256 |
|
|
|
|
| 233 |
format_msg = contents + "\n\n\n" + "{} files uploaded.\n" + message['text']
|
| 234 |
conversation.append({"role": "user", "content": format_msg})
|
| 235 |
else:
|
| 236 |
+
choice = ""
|
| 237 |
+
conversation.append({"role": "user", "image": "", "content": message['text']})
|
| 238 |
+
# else:
|
| 239 |
+
# for prompt, answer in history:
|
| 240 |
+
# if answer is None:
|
| 241 |
+
# prompt_files.append(prompt[0])
|
| 242 |
+
# conversation.extend([{"role": "user", "content": ""}, {"role": "assistant", "content": ""}])
|
| 243 |
+
# else:
|
| 244 |
+
# conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
| 245 |
+
# if len(prompt_files) > 0:
|
| 246 |
+
# choice, contents = mode_load(prompt_files[-1])
|
| 247 |
+
# else:
|
| 248 |
+
# choice = ""
|
| 249 |
+
# conversation.append({"role": "user", "image": "", "content": message['text']})
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
# if choice == "image":
|
| 253 |
+
# conversation.append({"role": "user", "image": contents, "content": message['text']})
|
| 254 |
+
# elif choice == "doc":
|
| 255 |
+
# format_msg = contents + "\n\n\n" + "{} files uploaded.\n" + message['text']
|
| 256 |
+
# conversation.append({"role": "user", "content": format_msg})
|
| 257 |
|
| 258 |
print(f"Conversation is -\n{conversation}")
|
| 259 |
|