merve HF staff commited on
Commit
de4cce0
β€’
1 Parent(s): 296d90c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
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("You:")
30
  message_history.append(input)
31
 
32
  with placeholder.container():
@@ -42,17 +42,17 @@ data = query(
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
 
 
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