Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,14 +16,12 @@ load_dotenv()
|
|
16 |
# initialize the client
|
17 |
client = OpenAI(
|
18 |
base_url="https://p7fw46eiw6xfkxvj.us-east-1.aws.endpoints.huggingface.cloud/v1/",
|
19 |
-
# "hf_xxx" # Replace with your token
|
20 |
api_key=os.environ.get('HUGGINGFACEHUB_API_TOKEN')
|
21 |
)
|
22 |
|
23 |
# Create supported models
|
24 |
model_links = {
|
25 |
"HAH v0.1": "drmasad/HAH-2024-v0.11",
|
26 |
-
"Mistral": "mistralai/Mistral-7B-Instruct-v0.2",
|
27 |
}
|
28 |
|
29 |
# Pull info about the model to display
|
@@ -32,11 +30,6 @@ model_info = {
|
|
32 |
{'description': """HAH 0.1 is a fine tuned model based on Mistral 7b instruct.\n \
|
33 |
\nIt was created by Dr M. As'ad using 250k dB rows sourced from open source articles on diabetes** \n""",
|
34 |
'logo': 'https://www.hmgaihub.com/untitled.png'},
|
35 |
-
"Mistral":
|
36 |
-
{'description': """The Mistral model is a **Large Language Model (LLM)** that's able to have question and answer interactions.\n \
|
37 |
-
\nIt was created by the [**Mistral AI**](https://mistral.ai/news/announcing-mistral-7b/) team as has over **7 billion parameters.** \n""",
|
38 |
-
'logo': 'https://mistral.ai/images/logo_hubc88c4ece131b91c7cb753f40e9e1cc5_2589_256x0_resize_q97_h2_lanczos_3.webp'},
|
39 |
-
|
40 |
}
|
41 |
|
42 |
|
@@ -119,7 +112,7 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
|
|
119 |
],
|
120 |
temperature=temp_values, # 0.5,
|
121 |
stream=True,
|
122 |
-
max_tokens=
|
123 |
)
|
124 |
|
125 |
response = st.write_stream(stream)
|
|
|
16 |
# initialize the client
|
17 |
client = OpenAI(
|
18 |
base_url="https://p7fw46eiw6xfkxvj.us-east-1.aws.endpoints.huggingface.cloud/v1/",
|
|
|
19 |
api_key=os.environ.get('HUGGINGFACEHUB_API_TOKEN')
|
20 |
)
|
21 |
|
22 |
# Create supported models
|
23 |
model_links = {
|
24 |
"HAH v0.1": "drmasad/HAH-2024-v0.11",
|
|
|
25 |
}
|
26 |
|
27 |
# Pull info about the model to display
|
|
|
30 |
{'description': """HAH 0.1 is a fine tuned model based on Mistral 7b instruct.\n \
|
31 |
\nIt was created by Dr M. As'ad using 250k dB rows sourced from open source articles on diabetes** \n""",
|
32 |
'logo': 'https://www.hmgaihub.com/untitled.png'},
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
|
|
|
112 |
],
|
113 |
temperature=temp_values, # 0.5,
|
114 |
stream=True,
|
115 |
+
max_tokens=1024,
|
116 |
)
|
117 |
|
118 |
response = st.write_stream(stream)
|