Spaces:
Sleeping
Sleeping
rigth execution path
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -71,13 +71,15 @@ st.markdown('<div class="chat-bubble-bot">Hallo Maria, ich bin dein Chatbot 🤖
|
|
| 71 |
import base64
|
| 72 |
import os
|
| 73 |
|
|
|
|
|
|
|
| 74 |
# Funktion, um ein Bild in Base64 zu konvertieren
|
| 75 |
def get_base64_of_bin_file(path):
|
| 76 |
with open(path, "rb") as f:
|
| 77 |
return base64.b64encode(f.read()).decode()
|
| 78 |
|
| 79 |
# relativer Pfad zu deinem Bild
|
| 80 |
-
image_path = os.path.join("img", "background.png")
|
| 81 |
bg_base64 = get_base64_of_bin_file(image_path)
|
| 82 |
|
| 83 |
# CSS einfügen
|
|
|
|
| 71 |
import base64
|
| 72 |
import os
|
| 73 |
|
| 74 |
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 75 |
+
|
| 76 |
# Funktion, um ein Bild in Base64 zu konvertieren
|
| 77 |
def get_base64_of_bin_file(path):
|
| 78 |
with open(path, "rb") as f:
|
| 79 |
return base64.b64encode(f.read()).decode()
|
| 80 |
|
| 81 |
# relativer Pfad zu deinem Bild
|
| 82 |
+
image_path = os.path.join(BASE_DIR, "img", "background.png")
|
| 83 |
bg_base64 = get_base64_of_bin_file(image_path)
|
| 84 |
|
| 85 |
# CSS einfügen
|