Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -194,8 +194,8 @@ def update_pdf_gallery_and_extract_text(pdf_files):
|
|
194 |
return pdf_files, pdf_text
|
195 |
|
196 |
def get_top_10_cases():
|
197 |
-
result =
|
198 |
-
return result[0]['
|
199 |
|
200 |
def add_message(history, message):
|
201 |
for x in message["files"]:
|
@@ -215,7 +215,7 @@ def bot(history):
|
|
215 |
response = ""
|
216 |
for message in client.chat_completion(
|
217 |
messages,
|
218 |
-
max_tokens=
|
219 |
stream=True,
|
220 |
temperature=0.6,
|
221 |
top_p=0.95,
|
@@ -250,8 +250,8 @@ with gr.Blocks(css=custom_css) as demo:
|
|
250 |
with gr.Tab("Argument Evaluation"):
|
251 |
with gr.Row():
|
252 |
with gr.Column(scale=1):
|
253 |
-
top_10_btn = gr.Button("Give me
|
254 |
-
top_10_output = gr.Textbox(label="
|
255 |
top_10_btn.click(get_top_10_cases, outputs=top_10_output)
|
256 |
with gr.Column(scale=2):
|
257 |
message = gr.Textbox(label="Case to Argue")
|
|
|
194 |
return pdf_files, pdf_text
|
195 |
|
196 |
def get_top_10_cases():
|
197 |
+
result = mask_filling_pipeline("Show 5 legal case with names and numbers from any State Court of Appeals in the US.", max_length=450, min_length=50, do_sample=False)
|
198 |
+
return result[0]['text']
|
199 |
|
200 |
def add_message(history, message):
|
201 |
for x in message["files"]:
|
|
|
215 |
response = ""
|
216 |
for message in client.chat_completion(
|
217 |
messages,
|
218 |
+
max_tokens=450,
|
219 |
stream=True,
|
220 |
temperature=0.6,
|
221 |
top_p=0.95,
|
|
|
250 |
with gr.Tab("Argument Evaluation"):
|
251 |
with gr.Row():
|
252 |
with gr.Column(scale=1):
|
253 |
+
top_10_btn = gr.Button("Give me 5 cases")
|
254 |
+
top_10_output = gr.Textbox(label="Show 5 Cases", interactive=False, elem_classes=["scroll-box"])
|
255 |
top_10_btn.click(get_top_10_cases, outputs=top_10_output)
|
256 |
with gr.Column(scale=2):
|
257 |
message = gr.Textbox(label="Case to Argue")
|