TuringsSolutions commited on
Commit
b4d009a
·
verified ·
1 Parent(s): dbdd751

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +13 -0
src/streamlit_app.py CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import os
3
  import tempfile
 
1
+ import sys
2
+ import os
3
+
4
+ # Get the absolute path of the directory where this script is located
5
+ current_dir = os.path.dirname(os.path.abspath(__file__))
6
+
7
+ # If the script is in /src, add that directory to sys.path so it can find flc_core.py
8
+ if current_dir not in sys.path:
9
+ sys.path.insert(0, current_dir)
10
+
11
+ # Now you can safely import your module
12
+ from flc_core import flc_encode_file, flc_decode_file, cosine_similarity_bytes
13
+
14
  import streamlit as st
15
  import os
16
  import tempfile