Spaces:
Build error
Build error
Update PanelInterface.py
Browse files- PanelInterface.py +16 -13
PanelInterface.py
CHANGED
|
@@ -89,7 +89,7 @@ def build_interface(respondent_agents_dict, processor_llm):
|
|
| 89 |
gr.HTML(f"""
|
| 90 |
<div style='text-align: left;'>
|
| 91 |
<h2>Our Panellists</h2>
|
| 92 |
-
<i>Click on
|
| 93 |
{panel_html}
|
| 94 |
</div>
|
| 95 |
<div id='bioModal' style='display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; border: 1px solid #ccc; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); width: 400px; max-height: 300px; padding: 20px; text-align: left; z-index: 1000; overflow-y: auto;'>
|
|
@@ -97,18 +97,21 @@ def build_interface(respondent_agents_dict, processor_llm):
|
|
| 97 |
<button onclick='closeModal()' style='margin-top: 10px; padding: 5px 10px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer;'>Close</button>
|
| 98 |
</div>
|
| 99 |
<div id='modalBackdrop' style='display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999;' onclick='closeModal()'></div>
|
|
|
|
| 100 |
<script>
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
|
|
|
|
|
|
| 112 |
</script>
|
| 113 |
""")
|
| 114 |
|
|
@@ -123,7 +126,7 @@ def build_interface(respondent_agents_dict, processor_llm):
|
|
| 123 |
with gr.Column():
|
| 124 |
gr.Markdown("""
|
| 125 |
<div style="text-align: center; margin-top: 20px; font-size: 14px;">
|
| 126 |
-
|
| 127 |
<a href="mailto:hello@predata.ai" onclick="event.stopPropagation();"
|
| 128 |
style="text-decoration: none; color: #007bff;">hello@predata.ai</a>
|
| 129 |
</div>
|
|
|
|
| 89 |
gr.HTML(f"""
|
| 90 |
<div style='text-align: left;'>
|
| 91 |
<h2>Our Panellists</h2>
|
| 92 |
+
<i>Click on a panellist's name to see their introduction</i><br>
|
| 93 |
{panel_html}
|
| 94 |
</div>
|
| 95 |
<div id='bioModal' style='display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; border: 1px solid #ccc; box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2); width: 400px; max-height: 300px; padding: 20px; text-align: left; z-index: 1000; overflow-y: auto;'>
|
|
|
|
| 97 |
<button onclick='closeModal()' style='margin-top: 10px; padding: 5px 10px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer;'>Close</button>
|
| 98 |
</div>
|
| 99 |
<div id='modalBackdrop' style='display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999;' onclick='closeModal()'></div>
|
| 100 |
+
|
| 101 |
<script>
|
| 102 |
+
window.addEventListener("DOMContentLoaded", function() {{
|
| 103 |
+
const bios = {str(bios_js_object).replace("'", '"')};
|
| 104 |
+
window.showModal = function(event, name) {{
|
| 105 |
+
event.preventDefault();
|
| 106 |
+
document.getElementById("bioContent").innerText = bios[name] || "Bio not found.";
|
| 107 |
+
document.getElementById("bioModal").style.display = "block";
|
| 108 |
+
document.getElementById("modalBackdrop").style.display = "block";
|
| 109 |
+
}};
|
| 110 |
+
window.closeModal = function() {{
|
| 111 |
+
document.getElementById("bioModal").style.display = "none";
|
| 112 |
+
document.getElementById("modalBackdrop").style.display = "none";
|
| 113 |
+
}};
|
| 114 |
+
}});
|
| 115 |
</script>
|
| 116 |
""")
|
| 117 |
|
|
|
|
| 126 |
with gr.Column():
|
| 127 |
gr.Markdown("""
|
| 128 |
<div style="text-align: center; margin-top: 20px; font-size: 14px;">
|
| 129 |
+
PreData.AI - All rights reserved. | Contact us at
|
| 130 |
<a href="mailto:hello@predata.ai" onclick="event.stopPropagation();"
|
| 131 |
style="text-decoration: none; color: #007bff;">hello@predata.ai</a>
|
| 132 |
</div>
|