Ankush05 commited on
Commit
8da6c75
·
2 Parent(s): cf012cb 1c852ef

Merge branch 'main' of https://huggingface.co/spaces/Ankush05/ChatBot

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
- from pymongo import MongoClient
3
  import os
4
- from transformers import pipeline, Conversation
 
5
 
6
 
7
 
@@ -16,12 +16,7 @@ col = db["chatbot"]
16
 
17
  def chatbot():
18
  st.title("ChatBot")
19
- uinput = st.chat_input("Enter your message")
20
- if uinput:
21
- st.chat(uinput)
22
- pipe = Conversation()
23
- response = pipe(uinput)
24
- st.chat(response)
25
- print(response)
26
-
27
 
 
1
  import streamlit as st
 
2
  import os
3
+ import pandas as pd
4
+ import tranformers
5
 
6
 
7
 
 
16
 
17
  def chatbot():
18
  st.title("ChatBot")
19
+ message = st.text_input("Enter your query here")
20
+ if st.button ("Submit"):
21
+ col.insert_one({"message": message})
 
 
 
 
 
22