Spaces:
Sleeping
Sleeping
Muhammad Haris
commited on
Commit
·
3a2b2b0
1
Parent(s):
0e8421f
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def get_medical_response(question, vectorizer, X_tfidf, model, tokenizer, sbert_
|
|
48 |
max_sim_index = similarities.argmax().item()
|
49 |
|
50 |
# LLM response generation
|
51 |
-
input_text = "
|
52 |
input_ids = tokenizer.encode(input_text, return_tensors="pt")
|
53 |
attention_mask = torch.ones(input_ids.shape, dtype=torch.long)
|
54 |
pad_token_id = tokenizer.eos_token_id
|
@@ -63,7 +63,7 @@ def get_medical_response(question, vectorizer, X_tfidf, model, tokenizer, sbert_
|
|
63 |
return lm_generated_response
|
64 |
|
65 |
# Streamlit app
|
66 |
-
st.title("
|
67 |
|
68 |
user_input = st.text_input("You:")
|
69 |
if user_input.lower() == "exit":
|
|
|
48 |
max_sim_index = similarities.argmax().item()
|
49 |
|
50 |
# LLM response generation
|
51 |
+
input_text = "DiBot: " + medical_df.iloc[max_sim_index]['Questions']
|
52 |
input_ids = tokenizer.encode(input_text, return_tensors="pt")
|
53 |
attention_mask = torch.ones(input_ids.shape, dtype=torch.long)
|
54 |
pad_token_id = tokenizer.eos_token_id
|
|
|
63 |
return lm_generated_response
|
64 |
|
65 |
# Streamlit app
|
66 |
+
st.title("DiBot")
|
67 |
|
68 |
user_input = st.text_input("You:")
|
69 |
if user_input.lower() == "exit":
|