Spaces:
Sleeping
Sleeping
Allen Park
commited on
Commit
·
6b786ce
1
Parent(s):
f9136ba
comment out gradio interface element and add print statement for model
Browse files
app.py
CHANGED
@@ -108,6 +108,7 @@ def model_call(question, document, answer, client_base_url):
|
|
108 |
base_url=client_base_url,
|
109 |
api_key=LEPTON_API_TOKEN
|
110 |
)
|
|
|
111 |
if question == "" or document == "" or answer == "":
|
112 |
return "", ""
|
113 |
NEW_FORMAT = PROMPT.format(question=question, document=document, answer=answer)
|
@@ -122,20 +123,20 @@ def model_call(question, document, answer, client_base_url):
|
|
122 |
combined_reasoning = " ".join(reasoning)[1:-1]
|
123 |
return combined_reasoning, score
|
124 |
|
125 |
-
inputs = [
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
]
|
130 |
-
outputs = [
|
131 |
-
|
132 |
-
|
133 |
-
]
|
134 |
|
135 |
with gr.Blocks() as demo:
|
136 |
base_url_state = gr.State(update_client_base_url("Patronus Lynx 8B"))
|
137 |
gr.Markdown(HEADER)
|
138 |
-
gr.Interface(fn=model_call, inputs=inputs, outputs=outputs)
|
139 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B", "Patronus Lynx 70B"], value="Patronus Lynx 8B", label="Model", interactive=True)
|
140 |
with gr.Row():
|
141 |
with gr.Column(scale=1):
|
|
|
108 |
base_url=client_base_url,
|
109 |
api_key=LEPTON_API_TOKEN
|
110 |
)
|
111 |
+
print("CLIENT AND CLIENT BASE URL", client, client_base_url)
|
112 |
if question == "" or document == "" or answer == "":
|
113 |
return "", ""
|
114 |
NEW_FORMAT = PROMPT.format(question=question, document=document, answer=answer)
|
|
|
123 |
combined_reasoning = " ".join(reasoning)[1:-1]
|
124 |
return combined_reasoning, score
|
125 |
|
126 |
+
# inputs = [
|
127 |
+
# gr.Textbox(label="Question"),
|
128 |
+
# gr.Textbox(label="Document"),
|
129 |
+
# gr.Textbox(label="Answer")
|
130 |
+
# ]
|
131 |
+
# outputs = [
|
132 |
+
# gr.Textbox(label="Reasoning"),
|
133 |
+
# gr.Textbox(label="Score")
|
134 |
+
# ]
|
135 |
|
136 |
with gr.Blocks() as demo:
|
137 |
base_url_state = gr.State(update_client_base_url("Patronus Lynx 8B"))
|
138 |
gr.Markdown(HEADER)
|
139 |
+
# gr.Interface(fn=model_call, inputs=inputs, outputs=outputs)
|
140 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B", "Patronus Lynx 70B"], value="Patronus Lynx 8B", label="Model", interactive=True)
|
141 |
with gr.Row():
|
142 |
with gr.Column(scale=1):
|