mehmet0001 commited on
Commit
b2f8e33
·
verified ·
1 Parent(s): 407a82b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -1
app.py CHANGED
@@ -45,4 +45,30 @@ if prompt and prompt_btn:
45
  model="deepseek/deepseek-r1:free",
46
  messages=[{"role":"user","content":prompt}])
47
 
48
- st.write((completion.choices[0].message.content)[7:-1])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  model="deepseek/deepseek-r1:free",
46
  messages=[{"role":"user","content":prompt}])
47
 
48
+ st.write((completion.choices[0].message.content)[7:-1])
49
+
50
+ import streamlit as st
51
+
52
+ def main():
53
+ # Set page title and icon
54
+ st.set_page_config(page_title="Simple Chatbot", page_icon="💬")
55
+
56
+ # App title
57
+ st.title("💬 Simple Chatbot")
58
+
59
+ # Chat input and response
60
+ if prompt := st.chat_input("What would you like to chat about?"):
61
+ # Display user message
62
+ with st.chat_message("user"):
63
+ st.markdown(prompt)
64
+
65
+ # Generate a simple response (replace with your actual chatbot logic)
66
+ response = f"You said: {prompt}"
67
+
68
+ # Display assistant response
69
+ with st.chat_message("assistant"):
70
+ st.markdown(response)
71
+
72
+ # Run the app
73
+ if __name__ == "__main__":
74
+ main()