Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ link_dict = {
|
|
| 32 |
"image segmentation": "https://huggingface.co/tasks/image-segmentation",
|
| 33 |
"object detection": "https://huggingface.co/tasks/object-detection"}
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
message_history = [{"text":"Let's find out the best task for your use case! Tell me about your use case :)", "is_user":False}]
|
| 38 |
|
|
@@ -43,10 +43,6 @@ for msg in message_history:
|
|
| 43 |
message(msg["text"], is_user = msg["is_user"]) # display all the previous message
|
| 44 |
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
#placeholder = st.empty() # placeholder for latest message
|
| 49 |
-
|
| 50 |
data, resp = query(
|
| 51 |
{
|
| 52 |
"inputs": {
|
|
@@ -76,5 +72,5 @@ if resp.status_code == 200:
|
|
| 76 |
with placeholder.container():
|
| 77 |
last_message = message_history[-1]
|
| 78 |
if last_message != "":
|
| 79 |
-
message(last_message["text"], last_message["is_user"])
|
| 80 |
|
|
|
|
| 32 |
"image segmentation": "https://huggingface.co/tasks/image-segmentation",
|
| 33 |
"object detection": "https://huggingface.co/tasks/object-detection"}
|
| 34 |
|
| 35 |
+
placeholder = st.empty() # placeholder for latest message
|
| 36 |
|
| 37 |
message_history = [{"text":"Let's find out the best task for your use case! Tell me about your use case :)", "is_user":False}]
|
| 38 |
|
|
|
|
| 43 |
message(msg["text"], is_user = msg["is_user"]) # display all the previous message
|
| 44 |
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
data, resp = query(
|
| 47 |
{
|
| 48 |
"inputs": {
|
|
|
|
| 72 |
with placeholder.container():
|
| 73 |
last_message = message_history[-1]
|
| 74 |
if last_message != "":
|
| 75 |
+
message(last_message["text"], last_message["is_user"])
|
| 76 |
|