DR-Rakshitha commited on
Commit
afaa3f6
·
1 Parent(s): f62a47a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -173,9 +173,9 @@ def generate_text(prompt):
173
  # return result
174
  logging.set_verbosity(logging.CRITICAL)
175
  # prompt = input()
176
- additional_prompt = "If the following question is not related to medical domain or hospital domain, Do not reply."
177
  prompt = additional_prompt + prompt
178
- pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer)
179
  result = pipe(f"<s>[INST] {prompt} [/INST]")
180
  output = result[0]['generated_text']
181
  return output
 
173
  # return result
174
  logging.set_verbosity(logging.CRITICAL)
175
  # prompt = input()
176
+ additional_prompt = "You are an AI Medical customer care bot. Please provide detailed and complete answers for only medical questions."
177
  prompt = additional_prompt + prompt
178
+ pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=1000)
179
  result = pipe(f"<s>[INST] {prompt} [/INST]")
180
  output = result[0]['generated_text']
181
  return output