Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ for msg in message_history:
|
|
| 26 |
message(msg) # display all the previous message
|
| 27 |
|
| 28 |
placeholder = st.empty() # placeholder for latest message
|
| 29 |
-
input = st.text_input("
|
| 30 |
message_history.append(input)
|
| 31 |
|
| 32 |
with placeholder.container():
|
|
@@ -42,17 +42,17 @@ data = query(
|
|
| 42 |
}
|
| 43 |
}
|
| 44 |
)
|
| 45 |
-
try:
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
|
| 51 |
|
| 52 |
-
|
| 53 |
except:
|
| 54 |
message("I'm listening π ")
|
| 55 |
message_history.append("I'm listening π")
|
| 56 |
-
|
| 57 |
|
| 58 |
|
|
|
|
| 26 |
message(msg) # display all the previous message
|
| 27 |
|
| 28 |
placeholder = st.empty() # placeholder for latest message
|
| 29 |
+
input = st.text_input("Ask me π€")
|
| 30 |
message_history.append(input)
|
| 31 |
|
| 32 |
with placeholder.container():
|
|
|
|
| 42 |
}
|
| 43 |
}
|
| 44 |
)
|
| 45 |
+
#try:
|
| 46 |
+
model_answer = data["answer"]
|
| 47 |
+
response_templates = [f"{model_answer} is the best task for this π€©", f"I think you should use {model_answer} πͺ", f"I think {model_answer} should work for you π€"]
|
| 48 |
+
bot_answer = random.choice(response_templates)
|
| 49 |
+
message_history.append(bot_answer)
|
| 50 |
|
| 51 |
|
| 52 |
+
"""
|
| 53 |
except:
|
| 54 |
message("I'm listening π ")
|
| 55 |
message_history.append("I'm listening π")
|
| 56 |
+
"""
|
| 57 |
|
| 58 |
|