Spaces:
Sleeping
Sleeping
Commit
·
48bd702
1
Parent(s):
1ca1b3a
update examples element
Browse files
app.py
CHANGED
|
@@ -28,6 +28,7 @@ def classify(_input):
|
|
| 28 |
|
| 29 |
soup = BeautifulSoup(html, 'html.parser')
|
| 30 |
explanation = soup.find_all('td')[-1].__str__().replace('td', 'div')
|
|
|
|
| 31 |
# adding legend to word importance explanation
|
| 32 |
result_html = explanation + legend
|
| 33 |
return score, result_html
|
|
@@ -58,7 +59,8 @@ with app:
|
|
| 58 |
inputs=[text_in],
|
| 59 |
outputs=[score_out, html_out],
|
| 60 |
fn=classify,
|
| 61 |
-
|
|
|
|
| 62 |
)
|
| 63 |
with gr.Column():
|
| 64 |
gr.Markdown(
|
|
|
|
| 28 |
|
| 29 |
soup = BeautifulSoup(html, 'html.parser')
|
| 30 |
explanation = soup.find_all('td')[-1].__str__().replace('td', 'div')
|
| 31 |
+
|
| 32 |
# adding legend to word importance explanation
|
| 33 |
result_html = explanation + legend
|
| 34 |
return score, result_html
|
|
|
|
| 59 |
inputs=[text_in],
|
| 60 |
outputs=[score_out, html_out],
|
| 61 |
fn=classify,
|
| 62 |
+
run_on_click=True,
|
| 63 |
+
cache_examples=False
|
| 64 |
)
|
| 65 |
with gr.Column():
|
| 66 |
gr.Markdown(
|