Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,15 +12,23 @@ from PIL import Image
|
|
12 |
st.title("Nexus TCM Chatbot")
|
13 |
query = st.text_input("Query: ", key="input")
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
# Desired height for the logo
|
20 |
-
logo_height =
|
21 |
|
22 |
# Display the logo with specified height
|
23 |
-
st.image(
|
24 |
|
25 |
if 'responses' not in st.session_state:
|
26 |
st.session_state['responses'] = []
|
|
|
12 |
st.title("Nexus TCM Chatbot")
|
13 |
query = st.text_input("Query: ", key="input")
|
14 |
|
15 |
+
from PIL import Image
|
16 |
+
from transformers.hub import get_dir_url
|
17 |
+
|
18 |
+
# Specify the relative path to the logo within the Hugging Face space
|
19 |
+
logo_path = "spaces/mathslearn/chatbot_test_streamlit/logo.jpeg"
|
20 |
+
|
21 |
+
# Get the URL to the directory containing the logo
|
22 |
+
logo_dir_url = get_dir_url(logo_path)
|
23 |
+
|
24 |
+
# Concatenate the directory URL and logo path to get the full URL
|
25 |
+
logo_url = f"{logo_dir_url}/{logo_path}"
|
26 |
|
27 |
# Desired height for the logo
|
28 |
+
logo_height = 200
|
29 |
|
30 |
# Display the logo with specified height
|
31 |
+
st.image(logo_url, caption="Nexus TCM Chatbot Logo", use_column_width=True, height=logo_height)
|
32 |
|
33 |
if 'responses' not in st.session_state:
|
34 |
st.session_state['responses'] = []
|