Spaces:
Paused
Paused
Commit
·
31dda22
1
Parent(s):
9f3822d
Update app.py
Browse files
app.py
CHANGED
@@ -173,7 +173,7 @@ 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,
|
177 |
prompt = additional_prompt + prompt
|
178 |
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=100)
|
179 |
result = pipe(f"<s>[INST] {prompt} [/INST]")
|
|
|
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, Reply /'this is not my domain./'. \n"
|
177 |
prompt = additional_prompt + prompt
|
178 |
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=100)
|
179 |
result = pipe(f"<s>[INST] {prompt} [/INST]")
|