Spaces:
Build error
Build error
Update PanelInterface.py
Browse files- PanelInterface.py +18 -18
PanelInterface.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import logging
|
| 4 |
|
|
@@ -14,7 +13,7 @@ def build_interface():
|
|
| 14 |
|
| 15 |
bios_js_object = {p["ID"]: p["Bio"] for p in panelists}
|
| 16 |
panel_html = "".join(
|
| 17 |
-
f'<p><a href="#" onclick="showModal(event, \
|
| 18 |
for p in panelists
|
| 19 |
)
|
| 20 |
|
|
@@ -24,14 +23,15 @@ def build_interface():
|
|
| 24 |
gr.Image("static/predata-logo.png", height=200, show_label=False, elem_id="logo")
|
| 25 |
|
| 26 |
with gr.Row(elem_classes="welcome-section"):
|
| 27 |
-
gr.
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
with gr.Row():
|
| 37 |
with gr.Column(scale=1, elem_classes="bio-section"):
|
|
@@ -69,18 +69,18 @@ def build_interface():
|
|
| 69 |
logging.info("Connected message box to chatbot_interface.")
|
| 70 |
|
| 71 |
with gr.Row(elem_classes="footer-row"):
|
| 72 |
-
gr.
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
| 79 |
|
| 80 |
logging.info("Interface build complete.")
|
| 81 |
return demo
|
| 82 |
|
| 83 |
-
|
| 84 |
def chatbot_interface(message, history=None):
|
| 85 |
"""
|
| 86 |
Handles chatbot interaction. Can be used both in Gradio and from MAIN.
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import logging
|
| 3 |
|
|
|
|
| 13 |
|
| 14 |
bios_js_object = {p["ID"]: p["Bio"] for p in panelists}
|
| 15 |
panel_html = "".join(
|
| 16 |
+
f'<p><a href="#" onclick="showModal(event, \"{p["ID"]}\")"><b>{p["Name"]}</b></a> – {p["Description"]}</p>'
|
| 17 |
for p in panelists
|
| 18 |
)
|
| 19 |
|
|
|
|
| 23 |
gr.Image("static/predata-logo.png", height=200, show_label=False, elem_id="logo")
|
| 24 |
|
| 25 |
with gr.Row(elem_classes="welcome-section"):
|
| 26 |
+
with gr.Column():
|
| 27 |
+
gr.Markdown("""
|
| 28 |
+
# Welcome to PreData.AI's Market Research Panel [Demo]
|
| 29 |
+
## Introducing our AI-powered panel:
|
| 30 |
+
- This panel consists of some **AI-powered agents** who will answer your questions.
|
| 31 |
+
- Ask them a question by **typing into the input box below**.
|
| 32 |
+
- Feel free to address a question to a **specific panellist**.
|
| 33 |
+
- If no panellist is specified, all of the panellists will respond.
|
| 34 |
+
""")
|
| 35 |
|
| 36 |
with gr.Row():
|
| 37 |
with gr.Column(scale=1, elem_classes="bio-section"):
|
|
|
|
| 69 |
logging.info("Connected message box to chatbot_interface.")
|
| 70 |
|
| 71 |
with gr.Row(elem_classes="footer-row"):
|
| 72 |
+
with gr.Column():
|
| 73 |
+
gr.Markdown("""
|
| 74 |
+
<div style="text-align: center; margin-top: 20px; font-size: 14px;">
|
| 75 |
+
© 2025 PreData.AI - All rights reserved. | Contact us at
|
| 76 |
+
<a href="mailto:hello@predata.ai" onclick="event.stopPropagation();"
|
| 77 |
+
style="text-decoration: none; color: #007bff;">hello@predata.ai</a>
|
| 78 |
+
</div>
|
| 79 |
+
""")
|
| 80 |
|
| 81 |
logging.info("Interface build complete.")
|
| 82 |
return demo
|
| 83 |
|
|
|
|
| 84 |
def chatbot_interface(message, history=None):
|
| 85 |
"""
|
| 86 |
Handles chatbot interaction. Can be used both in Gradio and from MAIN.
|