Update app.py
Browse files
app.py
CHANGED
@@ -241,7 +241,7 @@ def visualize_subTaraf(taraf_num, hadith_str, yaxis):
|
|
241 |
display-capture; encrypted-media;" sandbox="allow-modals allow-forms
|
242 |
allow-scripts allow-same-origin allow-popups
|
243 |
allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
|
244 |
-
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>"""
|
245 |
|
246 |
def taraf_booknum(taraf_num):
|
247 |
taraf = matn_info[matn_info['taraf_ID'] == taraf_num]
|
@@ -399,7 +399,7 @@ with gr.Blocks() as demo:
|
|
399 |
Yaxis = gr.Dropdown(choices = ['Taraf', 'Hadith', 'Isnad', 'Book'], value = 'Taraf', label = 'Variable to Display', info = 'Choose the variable to visualize.')
|
400 |
hadith_str = gr.Textbox(label='Hadith Selection', info='Choose which range of Hadith you would like visualized from the Taraf (eg "1, 2, 4-7")')
|
401 |
btn_sub = gr.Button('Visualize')
|
402 |
-
btn_sub.click(fn=visualize_subTaraf, inputs = [taraf_num, hadith_str, Yaxis], outputs=[gr.HTML()])
|
403 |
with gr.Tab('Select Hadith Isnad Visualizer'):
|
404 |
yyaxis = gr.Dropdown(choices = ['Taraf', 'Hadith', 'Isnad', 'Book'], value = 'Taraf', label = 'Variable to Display', info = 'Choose the variable to visualize.')
|
405 |
hadith_selection = gr.Dataframe(
|
|
|
241 |
display-capture; encrypted-media;" sandbox="allow-modals allow-forms
|
242 |
allow-scripts allow-same-origin allow-popups
|
243 |
allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
|
244 |
+
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", sub_taraf[['matn', 'Book_Name', 'Author', 'Book_ID', 'Hadith Number']]
|
245 |
|
246 |
def taraf_booknum(taraf_num):
|
247 |
taraf = matn_info[matn_info['taraf_ID'] == taraf_num]
|
|
|
399 |
Yaxis = gr.Dropdown(choices = ['Taraf', 'Hadith', 'Isnad', 'Book'], value = 'Taraf', label = 'Variable to Display', info = 'Choose the variable to visualize.')
|
400 |
hadith_str = gr.Textbox(label='Hadith Selection', info='Choose which range of Hadith you would like visualized from the Taraf (eg "1, 2, 4-7")')
|
401 |
btn_sub = gr.Button('Visualize')
|
402 |
+
btn_sub.click(fn=visualize_subTaraf, inputs = [taraf_num, hadith_str, Yaxis], outputs=[gr.HTML(), gr.DataFrame(wrap=True)])
|
403 |
with gr.Tab('Select Hadith Isnad Visualizer'):
|
404 |
yyaxis = gr.Dropdown(choices = ['Taraf', 'Hadith', 'Isnad', 'Book'], value = 'Taraf', label = 'Variable to Display', info = 'Choose the variable to visualize.')
|
405 |
hadith_selection = gr.Dataframe(
|