Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ def prv_process(qid):
|
|
| 59 |
query = f"SELECT * FROM html_text Where entity_id = '{target_QID}'"
|
| 60 |
reference_text_df = pd.read_sql_query(query, conn)
|
| 61 |
|
| 62 |
-
verbalised_claims_df_final = prv.verbalisation(claim_df)
|
| 63 |
|
| 64 |
progress = gr.Progress(len(verbalised_claims_df_final)) # Create progress bar for Gradio
|
| 65 |
def update_progress(curr_step, total_steps):
|
|
@@ -100,7 +100,7 @@ with gr.Blocks() as demo:
|
|
| 100 |
)
|
| 101 |
out_2 = gr.HTML(label="Results")
|
| 102 |
run_button_2 = gr.Button("Start processing")
|
| 103 |
-
run_button_2.click(fn=
|
| 104 |
|
| 105 |
|
| 106 |
if __name__ == "__main__":
|
|
|
|
| 59 |
query = f"SELECT * FROM html_text Where entity_id = '{target_QID}'"
|
| 60 |
reference_text_df = pd.read_sql_query(query, conn)
|
| 61 |
|
| 62 |
+
verbalised_claims_df_final = spaces.GPU(prv.verbalisation(claim_df))
|
| 63 |
|
| 64 |
progress = gr.Progress(len(verbalised_claims_df_final)) # Create progress bar for Gradio
|
| 65 |
def update_progress(curr_step, total_steps):
|
|
|
|
| 100 |
)
|
| 101 |
out_2 = gr.HTML(label="Results")
|
| 102 |
run_button_2 = gr.Button("Start processing")
|
| 103 |
+
run_button_2.click(fn=prv_process, inp, out_2)
|
| 104 |
|
| 105 |
|
| 106 |
if __name__ == "__main__":
|