Spaces:
Sleeping
Sleeping
Hazzzardous
commited on
Commit
·
5e6b514
1
Parent(s):
d1b43ed
Update app.py
Browse files
app.py
CHANGED
@@ -88,7 +88,9 @@ def infer(
|
|
88 |
if (mode == "Q/A"):
|
89 |
prompt = f"\nQ: {prompt}\n\nA:"
|
90 |
if (mode == "ELDR"):
|
91 |
-
prompt = f"\n{prompt}\n\nExpert Long Detailed Response
|
|
|
|
|
92 |
if (mode == "EFA"):
|
93 |
prompt = f'\nAsk Expert\n\nQuestion:\n{prompt}\n\nExpert Full Answer:\n'
|
94 |
if (mode == "BFR"):
|
@@ -255,10 +257,10 @@ iface = gr.Interface(
|
|
255 |
allow_flagging="never",
|
256 |
inputs=[
|
257 |
gr.Textbox(lines=20, label="Prompt"), # prompt
|
258 |
-
gr.Radio(["
|
259 |
-
value="
|
260 |
gr.Slider(1, 512, value=40), # max_tokens
|
261 |
-
gr.Slider(0.0, 5.0, value=
|
262 |
gr.Slider(0.0, 1.0, value=0.85), # top_p
|
263 |
gr.Textbox(lines=1, value="<|endoftext|>"), # stop
|
264 |
gr.Slider(-999, 0.0, value=0.0), # end_adj
|
@@ -286,7 +288,7 @@ chatiface = gr.Interface(
|
|
286 |
|
287 |
demo = gr.TabbedInterface(
|
288 |
|
289 |
-
[iface, chatiface], ["
|
290 |
title=title,
|
291 |
|
292 |
)
|
|
|
88 |
if (mode == "Q/A"):
|
89 |
prompt = f"\nQ: {prompt}\n\nA:"
|
90 |
if (mode == "ELDR"):
|
91 |
+
prompt = f"\n{prompt}\n\nExpert Long Detailed Response:\n\nHi, thanks for reaching out, we would be happy to answer your question"
|
92 |
+
if (mode == "Expert"):
|
93 |
+
prompt = f"\n{prompt}\n\nExpert Full Response:\n\nHi, thanks for reaching out, we would be happy to answer your question.\n"
|
94 |
if (mode == "EFA"):
|
95 |
prompt = f'\nAsk Expert\n\nQuestion:\n{prompt}\n\nExpert Full Answer:\n'
|
96 |
if (mode == "BFR"):
|
|
|
257 |
allow_flagging="never",
|
258 |
inputs=[
|
259 |
gr.Textbox(lines=20, label="Prompt"), # prompt
|
260 |
+
gr.Radio(["Freeform", "Q/A","ELDR","Expert","EFR","BFR"],
|
261 |
+
value="Expert", label="Choose Mode"),
|
262 |
gr.Slider(1, 512, value=40), # max_tokens
|
263 |
+
gr.Slider(0.0, 5.0, value=0.9), # temperature
|
264 |
gr.Slider(0.0, 1.0, value=0.85), # top_p
|
265 |
gr.Textbox(lines=1, value="<|endoftext|>"), # stop
|
266 |
gr.Slider(-999, 0.0, value=0.0), # end_adj
|
|
|
288 |
|
289 |
demo = gr.TabbedInterface(
|
290 |
|
291 |
+
[iface, chatiface], ["Q/A", "Chatbot"],
|
292 |
title=title,
|
293 |
|
294 |
)
|