andreska commited on
Commit
d361a71
·
verified ·
1 Parent(s): 8b0bcd3

Removed possibility to turn off Help

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -50,16 +50,16 @@ def handle_submit():
50
  user_input = st.session_state.user_input
51
 
52
  if user_input:
53
- if st.session_state.include_context:
54
- messages = [
55
- {"role": "system", "content": f"Context: {context}"},
56
- {"role": "user", "content": user_input}
57
- ]
58
- else:
59
- messages = [
60
- {"role": "system", "content": f"Context: Adrega is a powerful project management and reporting tool. It can show Gantt diagrams, S-Curves, Tabular reports and various charts in single reports, report bundles or in a customizable dashboard."},
61
- {"role": "user", "content": user_input}
62
- ]
63
 
64
  response = client.chat.completions.create(
65
  model="Qwen/Qwen2.5-72B-Instruct",
@@ -79,13 +79,13 @@ def handle_submit():
79
  st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
80
 
81
  st.text_input('Ask me a question', key='user_input', on_change=handle_submit)
82
- col1, col2 = st.columns(2)
83
- with col1:
84
- if st.button("Ask"):
85
- handle_submit()
86
 
87
  if 'conversation' not in st.session_state:
88
  st.session_state.conversation = ""
89
 
90
- with col2:
91
- st.session_state.include_context = st.checkbox('Search in Help')
 
50
  user_input = st.session_state.user_input
51
 
52
  if user_input:
53
+ #if st.session_state.include_context:
54
+ messages = [
55
+ {"role": "system", "content": f"Context: {context}"},
56
+ {"role": "user", "content": user_input}
57
+ ]
58
+ #else:
59
+ # messages = [
60
+ # {"role": "system", "content": f"Context: Adrega is a powerful project management and reporting tool. It can show Gantt diagrams, S-Curves, Tabular reports and various charts in single reports, report bundles or in a customizable dashboard."},
61
+ # {"role": "user", "content": user_input}
62
+ # ]
63
 
64
  response = client.chat.completions.create(
65
  model="Qwen/Qwen2.5-72B-Instruct",
 
79
  st.session_state.conversation(f"<p><strong>Adrega AI:</strong>: Please enter a question.")
80
 
81
  st.text_input('Ask me a question', key='user_input', on_change=handle_submit)
82
+ #col1, col2 = st.columns(2)
83
+ #with col1:
84
+ if st.button("Ask"):
85
+ handle_submit()
86
 
87
  if 'conversation' not in st.session_state:
88
  st.session_state.conversation = ""
89
 
90
+ #with col2:
91
+ # st.session_state.include_context = st.checkbox('Search in Help')