Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ DESCRIPTION = '''
|
|
15 |
|
16 |
LICENSE = """
|
17 |
<p>
|
18 |
-
This Health Assistant is designed to provide helpful healthcare information; however, it may make mistakes and is not designed to replace professional medical care. It is not intended to diagnose any condition or disease. Always consult with a qualified healthcare provider for any medical concerns.
|
19 |
</p>
|
20 |
"""
|
21 |
|
@@ -109,7 +109,7 @@ def chat_llama3_8b(message: str,
|
|
109 |
# Send the "thinking" message once text starts generating
|
110 |
if not thinking_message_sent:
|
111 |
thinking_message_sent = True
|
112 |
-
yield "A.I. Healthcare is Thinking...\n\n"
|
113 |
|
114 |
# Wait until </think> is detected before streaming output
|
115 |
if not think_detected:
|
@@ -136,15 +136,13 @@ with gr.Blocks(fill_height=True, css=css) as demo:
|
|
136 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
137 |
additional_inputs=[
|
138 |
gr.Slider(minimum=0.6, maximum=0.6, step=0.1, value=0.6, label="Temperature", render=False),
|
139 |
-
gr.Slider(minimum=
|
140 |
],
|
141 |
examples=[
|
142 |
['What are the common symptoms of diabetes?'],
|
143 |
['How can I manage high blood pressure with lifestyle changes?'],
|
144 |
['What nutritional advice can help improve heart health?'],
|
145 |
-
['Can you explain the benefits of regular exercise for mental well-being?']
|
146 |
-
['What should I know about the side effects of common medications?']
|
147 |
-
],
|
148 |
cache_examples=False,
|
149 |
)
|
150 |
|
|
|
15 |
|
16 |
LICENSE = """
|
17 |
<p>
|
18 |
+
This Health Assistant is designed to provide helpful healthcare information; however, it may make mistakes and is not designed to replace professional medical care. It is not intended to diagnose any condition or disease. Always consult with a qualified healthcare provider for any medical concerns.\n\nI hereby confirm that I am at least 18 years of age (or accompanied by a legal guardian who is at least 18 years old), understand that the information provided by this service is for informational purposes only and is not intended to diagnose or treat any medical condition, and acknowledge that I am solely responsible for verifying any information provided.
|
19 |
</p>
|
20 |
"""
|
21 |
|
|
|
109 |
# Send the "thinking" message once text starts generating
|
110 |
if not thinking_message_sent:
|
111 |
thinking_message_sent = True
|
112 |
+
yield "A.I. Healthcare is Thinking! Please wait, your response will output shortly...\n\n"
|
113 |
|
114 |
# Wait until </think> is detected before streaming output
|
115 |
if not think_detected:
|
|
|
136 |
additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False, render=False),
|
137 |
additional_inputs=[
|
138 |
gr.Slider(minimum=0.6, maximum=0.6, step=0.1, value=0.6, label="Temperature", render=False),
|
139 |
+
gr.Slider(minimum=1024, maximum=4096, step=128, value=2048, label="Max new tokens", render=False),
|
140 |
],
|
141 |
examples=[
|
142 |
['What are the common symptoms of diabetes?'],
|
143 |
['How can I manage high blood pressure with lifestyle changes?'],
|
144 |
['What nutritional advice can help improve heart health?'],
|
145 |
+
['Can you explain the benefits of regular exercise for mental well-being?']
|
|
|
|
|
146 |
cache_examples=False,
|
147 |
)
|
148 |
|