Update app.py
Browse files
app.py
CHANGED
@@ -14,36 +14,20 @@ def reset_conversation():
|
|
14 |
st.session_state.messages = []
|
15 |
return None
|
16 |
|
17 |
-
# Define model links
|
18 |
model_links = {
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"Gemma-2B": "google/gemma-2b-it",
|
22 |
-
"Zephyr-7B-β": "HuggingFaceH4/zephyr-7b-beta",
|
23 |
-
"Nous-Hermes-2-Yi-34B": "NousResearch/Nous-Hermes-2-Yi-34B"
|
24 |
}
|
25 |
|
26 |
-
# Define model info for all models
|
27 |
model_info = {
|
28 |
-
"
|
29 |
-
'description': "
|
30 |
-
'logo': 'https://
|
31 |
},
|
32 |
-
"
|
33 |
-
'description': "
|
34 |
-
'logo': 'https://
|
35 |
-
},
|
36 |
-
"Gemma-2B": {
|
37 |
-
'description': "The Gemma-2B model is a Large Language Model (LLM) developed by Google with 2 billion parameters.",
|
38 |
-
'logo': 'https://pbs.twimg.com/media/GG3sJg7X0AEaNIq.jpg'
|
39 |
-
},
|
40 |
-
"Zephyr-7B-β": {
|
41 |
-
'description': "The Zephyr-7B-β model is a Large Language Model (LLM) developed by HuggingFace.",
|
42 |
-
'logo': 'https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha/resolve/main/thumbnail.png'
|
43 |
-
},
|
44 |
-
"Nous-Hermes-2-Yi-34B": {
|
45 |
-
'description': "The Nous Hermes model is a Large Language Model (LLM) developed by Nous Research with 34 billion parameters.",
|
46 |
-
'logo': 'https://example.com/nous_hermes_logo.png'
|
47 |
}
|
48 |
}
|
49 |
|
@@ -93,9 +77,8 @@ def interact_with_together_api(messages):
|
|
93 |
|
94 |
return assistant_response
|
95 |
|
96 |
-
# Create sidebar with model selection dropdown
|
97 |
selected_model = st.sidebar.selectbox("Select Model", list(model_links.keys()))
|
98 |
-
temperature = st.sidebar.slider('Select Temperature', 0.0, 1.0, 0.5)
|
99 |
st.sidebar.button('Reset Chat', on_click=reset_conversation)
|
100 |
|
101 |
# Display model description and logo
|
|
|
14 |
st.session_state.messages = []
|
15 |
return None
|
16 |
|
17 |
+
# Define model links and info
|
18 |
model_links = {
|
19 |
+
"Addiction recovery AI": "NousResearch/Nous-Hermes-2-Yi-34B",
|
20 |
+
"Mental health AI": "NousResearch/Nous-Hermes-2-Yi-34B"
|
|
|
|
|
|
|
21 |
}
|
22 |
|
|
|
23 |
model_info = {
|
24 |
+
"Addiction recovery AI": {
|
25 |
+
'description': "This model provides support and guidance for individuals on their addiction recovery journey.",
|
26 |
+
'logo': 'https://example.com/addiction_recovery_logo.png'
|
27 |
},
|
28 |
+
"Mental health AI": {
|
29 |
+
'description': "This model offers assistance and resources for individuals dealing with mental health concerns.",
|
30 |
+
'logo': 'https://example.com/mental_health_logo.png'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
}
|
32 |
}
|
33 |
|
|
|
77 |
|
78 |
return assistant_response
|
79 |
|
80 |
+
# Create sidebar with model selection dropdown
|
81 |
selected_model = st.sidebar.selectbox("Select Model", list(model_links.keys()))
|
|
|
82 |
st.sidebar.button('Reset Chat', on_click=reset_conversation)
|
83 |
|
84 |
# Display model description and logo
|