scormon-predata-ai commited on
Commit
4e04210
·
verified ·
1 Parent(s): 3dc16f4

Update PanelInterface.py

Browse files
Files changed (1) hide show
  1. PanelInterface.py +19 -15
PanelInterface.py CHANGED
@@ -97,21 +97,25 @@ 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
-
 
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,7 +130,7 @@ def build_interface(respondent_agents_dict, processor_llm):
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>
 
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
+ gr.HTML(f"""
102
  <script>
103
+ const bios = {str(bios_js_object).replace("'", '"')};
104
+ window.showModal = function(event, name) {{
105
+ event.preventDefault();
106
+ const content = bios[name] || 'Bio not found.';
107
+ const modal = document.getElementById('bioModal');
108
+ const backdrop = document.getElementById('modalBackdrop');
109
+ if (modal && backdrop) {{
110
+ document.getElementById('bioContent').innerText = content;
111
+ modal.style.display = 'block';
112
+ backdrop.style.display = 'block';
113
+ }}
114
+ }};
115
+ window.closeModal = function() {{
116
+ document.getElementById('bioModal').style.display = 'none';
117
+ document.getElementById('modalBackdrop').style.display = 'none';
118
+ }};
119
  </script>
120
  """)
121
 
 
130
  with gr.Column():
131
  gr.Markdown("""
132
  <div style="text-align: center; margin-top: 20px; font-size: 14px;">
133
+ © 2025 PreData.AI - All rights reserved. | Contact us at
134
  <a href="mailto:hello@predata.ai" onclick="event.stopPropagation();"
135
  style="text-decoration: none; color: #007bff;">hello@predata.ai</a>
136
  </div>