Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -333,9 +333,9 @@ def get_multiple_recommendations(pred_caption: str, llm_model, tokenizer_model,
|
|
| 333 |
final_recommendations = (
|
| 334 |
generated_text.replace(getattr(tokenizer_model, "eos_token", ""), "").replace("<|im_end|>", "").strip()
|
| 335 |
)
|
| 336 |
-
final_recommendations = final_recommendations.replace("Cause:", "
|
| 337 |
-
final_recommendations = final_recommendations.replace("Immediate Action:", "
|
| 338 |
-
final_recommendations = final_recommendations.replace("Long-term Action:", "
|
| 339 |
|
| 340 |
return final_recommendations, retrieve_knowledge(pred_caption, knowledge_base)
|
| 341 |
|
|
|
|
| 333 |
final_recommendations = (
|
| 334 |
generated_text.replace(getattr(tokenizer_model, "eos_token", ""), "").replace("<|im_end|>", "").strip()
|
| 335 |
)
|
| 336 |
+
final_recommendations = final_recommendations.replace("Cause:", "Cause:")
|
| 337 |
+
final_recommendations = final_recommendations.replace("Immediate Action:", "Immediate Action:")
|
| 338 |
+
final_recommendations = final_recommendations.replace("Long-term Action:", "Long-term Action:")
|
| 339 |
|
| 340 |
return final_recommendations, retrieve_knowledge(pred_caption, knowledge_base)
|
| 341 |
|