sjdata commited on
Commit
c704b85
1 Parent(s): f59262b

Update app.py

Browse files

added healthcare params

Files changed (1) hide show
  1. app.py +12 -14
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 helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
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 = 2048
14
- DEFAULT_MAX_NEW_TOKENS = 1024
15
  MAX_INPUT_TOKEN_LENGTH = 4000
16
 
17
  DESCRIPTION = """
18
- # Llama-2 7B Chat
19
 
20
- This Space demonstrates model [Llama-2-7b-chat](https://huggingface.co/meta-llama/Llama-2-7b-chat) by Meta, a Llama 2 model with 7B parameters fine-tuned for chat instructions. Feel free to play with it, or duplicate to run generations without a queue! If you want to run your own service, you can also [deploy the model on Inference Endpoints](https://huggingface.co/inference-endpoints).
21
 
22
- 🔎 For more details about the Llama 2 family of models and how to use them with `transformers`, take a look [at our blog post](https://huggingface.co/blog/llama2).
23
 
24
- 🔨 Looking for an even more powerful model? Check out the [13B version](https://huggingface.co/spaces/huggingface-projects/llama-2-13b-chat) or the large [70B model demo](https://huggingface.co/spaces/ysharma/Explore_llamav2_with_TGI).
25
  """
26
 
27
  LICENSE = """
@@ -151,11 +149,11 @@ with gr.Blocks(css='style.css') as demo:
151
 
152
  gr.Examples(
153
  examples=[
154
- 'Hello there! How are you doing?',
155
- 'Can you explain briefly to me what is the Python programming language?',
156
- 'Explain the plot of Cinderella in a sentence.',
157
- 'How many hours does it take a man to eat a Helicopter?',
158
- "Write a 100-word article on 'Benefits of Open-Source in AI research'",
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],