Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,20 @@ import urllib.parse
|
|
6 |
import urllib.request
|
7 |
import pandas as pd
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# Function to query Google's Knowledge Graph API
|
10 |
def query_knowledge_graph(entity_id):
|
11 |
try:
|
@@ -63,18 +77,6 @@ st.sidebar.markdown("""
|
|
63 |
5. **Export Entities**: Export the entities as JSON or CSV.
|
64 |
""")
|
65 |
|
66 |
-
# Embed JavaScript chatbot code using Streamlit components
|
67 |
-
|
68 |
-
|
69 |
-
st.components.v1.html("""
|
70 |
-
<script src="https://cm36cv1ly1jf0za4zge3j22h8.agent.pa.smyth.ai/static/embodiment/chatBot/chatbot-v2.js"></script>
|
71 |
-
<script>
|
72 |
-
ChatBot.init({
|
73 |
-
domain: 'cm36cv1ly1jf0za4zge3j22h8.agent.pa.smyth.ai',
|
74 |
-
// additional settings can go here
|
75 |
-
});
|
76 |
-
</script>
|
77 |
-
""", height=100)
|
78 |
|
79 |
|
80 |
# Header and intro
|
|
|
6 |
import urllib.request
|
7 |
import pandas as pd
|
8 |
|
9 |
+
|
10 |
+
# Embed JavaScript chatbot code using Streamlit components with a visible height
|
11 |
+
st.components.v1.html("""
|
12 |
+
<script src="https://cm36cv1ly1jf0za4zge3j22h8.agent.pa.smyth.ai/static/embodiment/chatBot/chatbot-v2.js"></script>
|
13 |
+
<script>
|
14 |
+
ChatBot.init({
|
15 |
+
domain: 'cm36cv1ly1jf0za4zge3j22h8.agent.pa.smyth.ai',
|
16 |
+
introMessage: 'Hello, how can I assist you today?',
|
17 |
+
// additional settings, such as colors
|
18 |
+
});
|
19 |
+
</script>
|
20 |
+
""", height=200) # Set height to 200 for visibility
|
21 |
+
|
22 |
+
|
23 |
# Function to query Google's Knowledge Graph API
|
24 |
def query_knowledge_graph(entity_id):
|
25 |
try:
|
|
|
77 |
5. **Export Entities**: Export the entities as JSON or CSV.
|
78 |
""")
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
|
82 |
# Header and intro
|