Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
9d9ede7
1
Parent(s):
6956a0a
Refactor http_bot to include conversation history in prediction function
Browse files
app.py
CHANGED
@@ -249,8 +249,16 @@ def http_bot(
|
|
249 |
logger.info(f"==== User message ====\n{message}")
|
250 |
logger.info(f"==== Image paths ====\n{all_image_paths}")
|
251 |
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
logger.info(f"==== AI history ====\n{conv_history}")
|
255 |
|
256 |
|
|
|
249 |
logger.info(f"==== User message ====\n{message}")
|
250 |
logger.info(f"==== Image paths ====\n{all_image_paths}")
|
251 |
|
252 |
+
history = state.get_prompt()
|
253 |
+
logger.info(f"==== History ====\n{history}")
|
254 |
+
response, conv_history = predict(message,
|
255 |
+
all_image_paths[0],
|
256 |
+
history,
|
257 |
+
max_input_tiles,
|
258 |
+
temperature,
|
259 |
+
max_new_tokens,
|
260 |
+
top_p,
|
261 |
+
repetition_penalty)
|
262 |
logger.info(f"==== AI history ====\n{conv_history}")
|
263 |
|
264 |
|