Update app.py
Browse files
app.py
CHANGED
@@ -74,11 +74,11 @@ def chat_with_ner(message, history):
|
|
74 |
prompt = f"This text contains medical terms: {', '.join(recognized_entities)}. Please explain briefly."
|
75 |
else:
|
76 |
prompt = message
|
77 |
-
|
78 |
response = client.text_generation(prompt, max_new_tokens=100) # Gunakan text_generation()
|
79 |
highlighted_message = highlight_text(message, entities)
|
80 |
|
81 |
-
history.append((
|
82 |
|
83 |
return history, highlighted_message
|
84 |
|
|
|
74 |
prompt = f"This text contains medical terms: {', '.join(recognized_entities)}. Please explain briefly."
|
75 |
else:
|
76 |
prompt = message
|
77 |
+
show_to_history = f"Medical Object Recognized : {', '.join(recognized_entities)}. Here are the information about the recognized medical object."
|
78 |
response = client.text_generation(prompt, max_new_tokens=100) # Gunakan text_generation()
|
79 |
highlighted_message = highlight_text(message, entities)
|
80 |
|
81 |
+
history.append((show_to_history, response)) # Tambahkan ke history
|
82 |
|
83 |
return history, highlighted_message
|
84 |
|