ogegadavis254 commited on
Commit
b4891d1
·
verified ·
1 Parent(s): dc98b46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -27
app.py CHANGED
@@ -14,36 +14,20 @@ def reset_conversation():
14
  st.session_state.messages = []
15
  return None
16
 
17
- # Define model links for Hugging Face models
18
  model_links = {
19
- "Mistral": "mistralai/Mistral-7B-Instruct-v0.2",
20
- "Gemma-7B": "google/gemma-7b-it",
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
- "Mistral": {
29
- 'description': "The Mistral model is a Large Language Model (LLM) developed by Mistral AI.",
30
- 'logo': 'https://mistral.ai/images/logo_hubc88c4ece131b91c7cb753f40e9e1cc5_2589_256x0_resize_q97_h2_lanczos_3.webp'
31
  },
32
- "Gemma-7B": {
33
- 'description': "The Gemma-7B model is a Large Language Model (LLM) developed by Google with 7 billion parameters.",
34
- 'logo': 'https://pbs.twimg.com/media/GG3sJg7X0AEaNIq.jpg'
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 and temperature slider
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