Sunil Surendra Singh commited on
Commit
a35dac3
·
1 Parent(s): 2dcb3fd

Added streamlit and pymongo

Browse files
streamlit/requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
- "requests"
2
- "pymongo[srv]"
 
 
1
+ streamlit
2
+ requests
3
+ pymongo[srv]
streamlit/src/utils.py CHANGED
@@ -2,7 +2,8 @@
2
 
3
  from config import app_config
4
  import streamlit as st
5
- import s3fs
 
6
 
7
 
8
  def setup_app(config):
@@ -60,15 +61,15 @@ def get_class_from_name(module: str, class_name: str):
60
  # return pred, pred_proba.squeeze()
61
 
62
 
63
- def download_from_s3(source_s3_uri, target_file):
64
- """connect to S3 and download file"""
65
- with st.spinner(
66
- f"Downloading trained model it may take few minutes, please be patient..."
67
- ):
68
- fs = s3fs.S3FileSystem(
69
- key=st.secrets["AWS_ACCESS_KEY"], secret=st.secrets["AWS_ACCESS_SECRET"]
70
- )
71
- fs.download(source_s3_uri, target_file)
72
 
73
 
74
  def read(file) -> str:
 
2
 
3
  from config import app_config
4
  import streamlit as st
5
+
6
+ # import s3fs
7
 
8
 
9
  def setup_app(config):
 
61
  # return pred, pred_proba.squeeze()
62
 
63
 
64
+ # def download_from_s3(source_s3_uri, target_file):
65
+ # """connect to S3 and download file"""
66
+ # with st.spinner(
67
+ # f"Downloading trained model it may take few minutes, please be patient..."
68
+ # ):
69
+ # fs = s3fs.S3FileSystem(
70
+ # key=st.secrets["AWS_ACCESS_KEY"], secret=st.secrets["AWS_ACCESS_SECRET"]
71
+ # )
72
+ # fs.download(source_s3_uri, target_file)
73
 
74
 
75
  def read(file) -> str: