Momal commited on
Commit
ab64780
·
1 Parent(s): 96e69eb

remved key

Browse files
Files changed (2) hide show
  1. README.md +2 -1
  2. app.py +14 -14
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: MentalHealth Assistant Using RAG
3
- emoji: 💻
4
  colorFrom: purple
5
  colorTo: pink
6
  sdk: streamlit
@@ -8,6 +8,7 @@ sdk_version: 1.32.2
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: MentalHealth Assistant Using RAG
3
+ emoji: :broken_heart:
4
  colorFrom: purple
5
  colorTo: pink
6
  sdk: streamlit
 
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
+ app_port: 8501
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -63,17 +63,17 @@ def mh_assistant(openai_key,query):
63
  st.title('Mental Health Assistant :broken_heart:')
64
 
65
  # Create a text input box for the OpenAI key
66
- openai_key = st.text_input('Enter your OpenAI Key', type='password')
67
- key_submit = st.button('Submit')
68
- # Display the key when the user presses the 'Submit' button
69
- if key_submit and openai_key:
70
- query = st.text_input('Enter your query', type='default')
71
- if query:
72
- try:
73
- # with st.spinner('Processing your query...'):
74
- response = mh_assistant(openai_key,query)
75
- print("response",response)
76
- except Exception as e:
77
- st.error(f'An error occurred: {e}',icon=':no_entry_sign:')
78
- elif key_submit and not openai_key:
79
- st.error('Please enter your OpenAI key',icon="🚨")
 
63
  st.title('Mental Health Assistant :broken_heart:')
64
 
65
  # Create a text input box for the OpenAI key
66
+ # openai_key = st.text_input('Enter your OpenAI Key', type='password')
67
+ # key_submit = st.button('Submit')
68
+ # # Display the key when the user presses the 'Submit' button
69
+ # if key_submit and openai_key:
70
+ query = st.text_input('Enter your query', type='default')
71
+ if query:
72
+ try:
73
+ # with st.spinner('Processing your query...'):
74
+ response = mh_assistant("jbkuyb",query)
75
+ print("response",response)
76
+ except Exception as e:
77
+ st.error(f'An error occurred: {e}',icon=':no_entry_sign:')
78
+ # elif key_submit and not openai_key:
79
+ # st.error('Please enter your OpenAI key',icon="🚨")