Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ prompt_template = """Answer the question only according to the information provi
|
|
25 |
## Question :
|
26 |
# {}"""
|
27 |
|
28 |
-
prompt = st.
|
29 |
prompt_btn = st.button("Enter")
|
30 |
|
31 |
if prompt and prompt_btn:
|
@@ -45,30 +45,4 @@ 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])
|
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()
|
|
|
25 |
## Question :
|
26 |
# {}"""
|
27 |
|
28 |
+
prompt = st.chat_input("What would you like to chat about?")
|
29 |
prompt_btn = st.button("Enter")
|
30 |
|
31 |
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])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|