Update app.py
Browse filesadded healthcare params
app.py
CHANGED
@@ -6,22 +6,20 @@ import torch
|
|
6 |
from model import get_input_token_length, run
|
7 |
|
8 |
DEFAULT_SYSTEM_PROMPT = """\
|
9 |
-
You are a
|
10 |
-
|
11 |
-
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\
|
12 |
"""
|
13 |
-
MAX_MAX_NEW_TOKENS =
|
14 |
-
DEFAULT_MAX_NEW_TOKENS =
|
15 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
16 |
|
17 |
DESCRIPTION = """
|
18 |
-
#
|
19 |
|
20 |
-
This
|
21 |
|
22 |
-
|
23 |
|
24 |
-
|
25 |
"""
|
26 |
|
27 |
LICENSE = """
|
@@ -151,11 +149,11 @@ with gr.Blocks(css='style.css') as demo:
|
|
151 |
|
152 |
gr.Examples(
|
153 |
examples=[
|
154 |
-
'
|
155 |
-
'Can you
|
156 |
-
'Explain the
|
157 |
-
'How many hours
|
158 |
-
"
|
159 |
],
|
160 |
inputs=textbox,
|
161 |
outputs=[textbox, chatbot],
|
|
|
6 |
from model import get_input_token_length, run
|
7 |
|
8 |
DEFAULT_SYSTEM_PROMPT = """\
|
9 |
+
You are a healthcare bot. You will give friendly advice for the Prevention and Treatment of various illnesses.\
|
|
|
|
|
10 |
"""
|
11 |
+
MAX_MAX_NEW_TOKENS = 1024
|
12 |
+
DEFAULT_MAX_NEW_TOKENS = 512
|
13 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
14 |
|
15 |
DESCRIPTION = """
|
16 |
+
# Healthcare Bot
|
17 |
|
18 |
+
This interface demonstrates a healthcare bot using the [Llama-2-7b-chat](https://huggingface.co/meta-llama/Llama-2-7b-chat) model by Meta. This Llama 2 model, with 7B parameters, has been fine-tuned for providing advice on prevention and treatment of various illnesses.
|
19 |
|
20 |
+
Feel free to ask any health-related questions. You can also [deploy this model on Inference Endpoints](https://huggingface.co/inference-endpoints) to run your own healthcare service.
|
21 |
|
22 |
+
⚠️ Please remember that while this bot provides health advice based on its training data, it is not a substitute for professional medical advice.
|
23 |
"""
|
24 |
|
25 |
LICENSE = """
|
|
|
149 |
|
150 |
gr.Examples(
|
151 |
examples=[
|
152 |
+
'What are some common symptoms of diabetes?',
|
153 |
+
'Can you tell me about the benefits of regular exercise?',
|
154 |
+
'Explain the importance of a balanced diet.',
|
155 |
+
'How many hours of sleep should an adult get each night?',
|
156 |
+
"What are some ways to reduce stress?",
|
157 |
],
|
158 |
inputs=textbox,
|
159 |
outputs=[textbox, chatbot],
|