ghodrat commited on
Commit
69daa2a
·
verified ·
1 Parent(s): f8efc18

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +19 -4
src/streamlit_app.py CHANGED
@@ -1,5 +1,20 @@
1
- import streamlit as st
 
2
 
3
- # Display Hello World text
4
- st.title('Hello, World!')
5
- st.write('Welcome to Streamlit!')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import hf_hub_download , snapshot_download
2
+ import importlib
3
 
4
+ # snapshot_downloading your private space
5
+ snapshot_download(
6
+ repo_id="/ghodrat/app",
7
+ repo_type="space",
8
+ cache_dir="cache-dir"
9
+ )
10
+ # calling the app code
11
+ app = hf_hub_download(
12
+ repo_id="/ghodrat/app",
13
+ filename="app.py",
14
+ repo_type="space"
15
+ )
16
+
17
+ # executing the app file
18
+ spec_app = importlib.util.spec_from_file_location("*",app_path)
19
+ app = importlib.util.module_from_spec(spec_app)
20
+ spec_app.loader.exec_module(app)