Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def network_narrator(narrator_id, fst_year, lst_year, yaxis):
|
|
78 |
display-capture; encrypted-media;" sandbox="allow-modals allow-forms
|
79 |
allow-scripts allow-same-origin allow-popups
|
80 |
allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
|
81 |
-
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>"""
|
82 |
|
83 |
def narrator_retriever(name):
|
84 |
return narrator_bios[(narrator_bios['Official Name'].str.contains(name)) | (narrator_bios['Famous Name'].str.contains(name)) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]
|
@@ -101,7 +101,7 @@ with gr.Blocks() as demo:
|
|
101 |
image_button = gr.Button("Visualize!")
|
102 |
|
103 |
text_button.click(narrator_retriever, inputs=text_input, outputs=text_output)
|
104 |
-
image_button.click(network_narrator, inputs=[image_input, FirstYear, Last_Year, Yaxis], outputs=image_output)
|
105 |
|
106 |
demo.launch()
|
107 |
|
|
|
78 |
display-capture; encrypted-media;" sandbox="allow-modals allow-forms
|
79 |
allow-scripts allow-same-origin allow-popups
|
80 |
allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
|
81 |
+
allowpaymentrequest="" frameborder="0" srcdoc='{html}'></iframe>""", edges_prepped[['Teacher', 'Student']]
|
82 |
|
83 |
def narrator_retriever(name):
|
84 |
return narrator_bios[(narrator_bios['Official Name'].str.contains(name)) | (narrator_bios['Famous Name'].str.contains(name)) | (narrator_bios['Rawi ID'].astype(str) == name)][['Rawi ID', 'Title Name', 'Official Name', 'Famous Name', 'Number of Narrations', 'Narrator Rank', 'Generation' ]]
|
|
|
101 |
image_button = gr.Button("Visualize!")
|
102 |
|
103 |
text_button.click(narrator_retriever, inputs=text_input, outputs=text_output)
|
104 |
+
image_button.click(network_narrator, inputs=[image_input, FirstYear, Last_Year, Yaxis], outputs=[image_output, gr.DataFrame()])
|
105 |
|
106 |
demo.launch()
|
107 |
|