Delete answer_helper.py
Browse files- answer_helper.py +0 -8
answer_helper.py
DELETED
|
@@ -1,8 +0,0 @@
|
|
| 1 |
-
from transformers import pipeline
|
| 2 |
-
|
| 3 |
-
qa_model = pipeline("text-generation", model="tiiuae/falcon-7b-instruct", device=0)
|
| 4 |
-
|
| 5 |
-
def get_helper_response(question):
|
| 6 |
-
prompt = f"The user is unsure about the following question: '{question}'. Provide a hint or clarification to help them answer yes or no."
|
| 7 |
-
response = qa_model(prompt, max_length=50, do_sample=True)[0]['generated_text']
|
| 8 |
-
return response.split("help them answer yes or no.")[-1].strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|