mehmet0001 commited on
Commit
db8135f
·
verified ·
1 Parent(s): e21682e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -37,13 +37,12 @@ if st.session_state.stage == "crawl-input":
37
  st.session_state.stage = "remove-crawl-input-widgets"
38
 
39
  if st.session_state.stage == "prompt-input":
 
 
 
40
  prompt = st.chat_input("Ask the documentation a question!")
41
 
42
  if prompt:
43
- for message in st.session_state.messages:
44
- with st.chat_message(message["role"]):
45
- st.markdown(message)
46
-
47
  with st.chat_message("user"):
48
  st.markdown(prompt)
49
 
@@ -63,10 +62,9 @@ if st.session_state.stage == "prompt-input":
63
  extra_body={},
64
  model="deepseek/deepseek-r1:free",
65
  messages=[{"role":"user","content":prompt}])
66
-
 
67
  with st.chat_message("assistant"):
68
- full_response = ""
69
- message_placeholder = st.empty()
70
  for chunk in completion.choices[0].message.content.split():
71
  full_response += chunk + " "
72
  time.sleep(0.05)
 
37
  st.session_state.stage = "remove-crawl-input-widgets"
38
 
39
  if st.session_state.stage == "prompt-input":
40
+ for message in st.session_state.messages:
41
+ with st.chat_message(message["role"]):
42
+ st.markdown(message)
43
  prompt = st.chat_input("Ask the documentation a question!")
44
 
45
  if prompt:
 
 
 
 
46
  with st.chat_message("user"):
47
  st.markdown(prompt)
48
 
 
62
  extra_body={},
63
  model="deepseek/deepseek-r1:free",
64
  messages=[{"role":"user","content":prompt}])
65
+ full_response = ""
66
+ message_placeholder = st.empty()
67
  with st.chat_message("assistant"):
 
 
68
  for chunk in completion.choices[0].message.content.split():
69
  full_response += chunk + " "
70
  time.sleep(0.05)