Aranwer commited on
Commit
917be1f
·
verified ·
1 Parent(s): 40954d0

Delete answer_helper.py

Browse files
Files changed (1) hide show
  1. 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()