Spaces:
Sleeping
Sleeping
Allen Park
commited on
Commit
·
f575d58
1
Parent(s):
f41fff5
try formatting ui to have upload right next to textboxes for input
Browse files
app.py
CHANGED
@@ -147,17 +147,24 @@ with gr.Blocks() as demo:
|
|
147 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B v1.1", "Patronus Lynx 70B"], value="Patronus Lynx 8B v1.1", label="Model", interactive=True)
|
148 |
with gr.Row():
|
149 |
with gr.Column(scale=1):
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
with gr.Row():
|
154 |
clear_btn = gr.ClearButton([question, document, answer])
|
155 |
submit_button = gr.Button("Submit")
|
156 |
with gr.Column(scale=1):
|
157 |
reasoning = gr.Textbox(label="Reasoning")
|
158 |
score = gr.Textbox(label="Score (FAIL if Hallucinated, PASS if not)")
|
159 |
-
u = gr.UploadButton("Upload a file", file_count="single")
|
160 |
-
d = gr.DownloadButton("Download the file", visible=False)
|
161 |
|
162 |
model_dropdown.change(fn=update_client_base_url, inputs=[model_dropdown], outputs=[base_url_state])
|
163 |
u.upload(upload_file, u, [u, d])
|
|
|
147 |
model_dropdown = gr.Dropdown(choices=["Patronus Lynx 8B v1.1", "Patronus Lynx 70B"], value="Patronus Lynx 8B v1.1", label="Model", interactive=True)
|
148 |
with gr.Row():
|
149 |
with gr.Column(scale=1):
|
150 |
+
with gr.Row():
|
151 |
+
with gr.Column(scale=4):
|
152 |
+
question = gr.Textbox(label="Question")
|
153 |
+
with gr.Column(scale=1):
|
154 |
+
u = gr.UploadButton("Upload a file", file_count="single")
|
155 |
+
d = gr.DownloadButton("Download the file", visible=False)
|
156 |
+
with gr.Row():
|
157 |
+
with gr.Column(scale=1):
|
158 |
+
document = gr.Textbox(label="Document")
|
159 |
+
with gr.Row():
|
160 |
+
with gr.Column(scale=1):
|
161 |
+
answer = gr.Textbox(label="Answer")
|
162 |
with gr.Row():
|
163 |
clear_btn = gr.ClearButton([question, document, answer])
|
164 |
submit_button = gr.Button("Submit")
|
165 |
with gr.Column(scale=1):
|
166 |
reasoning = gr.Textbox(label="Reasoning")
|
167 |
score = gr.Textbox(label="Score (FAIL if Hallucinated, PASS if not)")
|
|
|
|
|
168 |
|
169 |
model_dropdown.change(fn=update_client_base_url, inputs=[model_dropdown], outputs=[base_url_state])
|
170 |
u.upload(upload_file, u, [u, d])
|