Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
tanveeshsingh
commited on
Commit
•
b65a52e
1
Parent(s):
f171306
Template Changes
Browse files
app.py
CHANGED
@@ -20,9 +20,7 @@ ANSWER:
|
|
20 |
{{answer}}
|
21 |
|
22 |
--
|
23 |
-
|
24 |
-
Your output should be in JSON FORMAT with the keys "REASONING" and "SCORE":
|
25 |
-
{{"REASONING": <your reasoning as bullet points>, "SCORE": <your final score>}}""")
|
26 |
|
27 |
def update_inputs(input_style):
|
28 |
if input_style == "Conv":
|
@@ -40,6 +38,11 @@ async def lynx(input_style_dropdown,document_input,question_input,answer_input):
|
|
40 |
api_key=os.getenv("HF_TOKEN")
|
41 |
)
|
42 |
rendered_prompt = prompt.render(question=question_input,context=document_input,answer=answer_input)
|
|
|
|
|
|
|
|
|
|
|
43 |
print(prompt.render(question=question_input,context=document_input,answer=answer_input))
|
44 |
chat_completion = await client.chat.completions.create(
|
45 |
model="tgi",
|
|
|
20 |
{{answer}}
|
21 |
|
22 |
--
|
23 |
+
""")
|
|
|
|
|
24 |
|
25 |
def update_inputs(input_style):
|
26 |
if input_style == "Conv":
|
|
|
38 |
api_key=os.getenv("HF_TOKEN")
|
39 |
)
|
40 |
rendered_prompt = prompt.render(question=question_input,context=document_input,answer=answer_input)
|
41 |
+
rendered_prompt +="""
|
42 |
+
|
43 |
+
Your output should be in JSON FORMAT with the keys "REASONING" and "SCORE":
|
44 |
+
{{"REASONING": <your reasoning as bullet points>, "SCORE": <your final score>}}
|
45 |
+
"""
|
46 |
print(prompt.render(question=question_input,context=document_input,answer=answer_input))
|
47 |
chat_completion = await client.chat.completions.create(
|
48 |
model="tgi",
|