Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -395,6 +395,7 @@ def itt(url):
|
|
395 |
print (d)
|
396 |
r = requests.get(f'{url}.{i}.{d}.pdf')
|
397 |
print(f'{url}.{i}.{d}.pdf')
|
|
|
398 |
if r.status_code == 200:
|
399 |
out.append(f'{url}.{i}.{d}.pdf')
|
400 |
yield out
|
@@ -402,7 +403,7 @@ def itt(url):
|
|
402 |
print(p)
|
403 |
r1 = requests.get(f'{url}.{i}.{d}_{p}.pdf')
|
404 |
print(f'{url}.{i}.{d}_{p}.pdf')
|
405 |
-
|
406 |
if r1.status_code == 200:
|
407 |
out.append(f'{url}.{i}.{d}_{p}.pdf')
|
408 |
yield out
|
@@ -437,8 +438,8 @@ with gr.Blocks() as app:
|
|
437 |
e_box=gr.Textbox()
|
438 |
#text=gr.JSON()
|
439 |
#inp_query.change(search_models,inp_query,models_dd)
|
440 |
-
test_btn.click(itt,url,e_box)
|
441 |
clear_btn.click(clear_fn,None,[prompt,chatbot])
|
442 |
go=button.click(summarize,[prompt,chatbot,data,file,url,pdf_url,pdf_batch],[prompt,chatbot,e_box,json_out])
|
443 |
-
stop_button.click(None,None,None,cancels=[go])
|
444 |
app.launch(server_port=7860,show_api=False)
|
|
|
395 |
print (d)
|
396 |
r = requests.get(f'{url}.{i}.{d}.pdf')
|
397 |
print(f'{url}.{i}.{d}.pdf')
|
398 |
+
print(r.status_code)
|
399 |
if r.status_code == 200:
|
400 |
out.append(f'{url}.{i}.{d}.pdf')
|
401 |
yield out
|
|
|
403 |
print(p)
|
404 |
r1 = requests.get(f'{url}.{i}.{d}_{p}.pdf')
|
405 |
print(f'{url}.{i}.{d}_{p}.pdf')
|
406 |
+
print(r1.status_code)
|
407 |
if r1.status_code == 200:
|
408 |
out.append(f'{url}.{i}.{d}_{p}.pdf')
|
409 |
yield out
|
|
|
438 |
e_box=gr.Textbox()
|
439 |
#text=gr.JSON()
|
440 |
#inp_query.change(search_models,inp_query,models_dd)
|
441 |
+
test_b=test_btn.click(itt,url,e_box)
|
442 |
clear_btn.click(clear_fn,None,[prompt,chatbot])
|
443 |
go=button.click(summarize,[prompt,chatbot,data,file,url,pdf_url,pdf_batch],[prompt,chatbot,e_box,json_out])
|
444 |
+
stop_button.click(None,None,None,cancels=[go,test_b])
|
445 |
app.launch(server_port=7860,show_api=False)
|