Andrey commited on
Commit
cdb8c6a
1 Parent(s): 04f1d1a

To hugging face (#9)

Browse files
Files changed (3) hide show
  1. README.md +12 -11
  2. src/utils.py +7 -1
  3. app.py → st_app.py +0 -0
README.md CHANGED
@@ -1,11 +1,12 @@
1
- # digit-draw-detect
2
- An app for handwritten digit detection
3
-
4
- steps:
5
- * use git lfs for the model +
6
- * write better code +
7
- * convert model to onnx or some other format?. not needed
8
- * deploy bare working app, without nice things +
9
- * save images to amazon+
10
- * make better design
11
- * think about descriptions on the site
 
 
1
+ ---
2
+ title: Digit Draw Detect
3
+ emoji: ✍️
4
+ colorFrom: pink
5
+ colorTo: green
6
+ sdk: streamlit
7
+ python_version: 3.10.4
8
+ sdk_version: 1.15.2
9
+ app_file: st_app.py
10
+ pinned: false
11
+ license: mit
12
+ ---
src/utils.py CHANGED
@@ -10,7 +10,13 @@ import matplotlib.pyplot as plt
10
  import numpy.typing as npt
11
  import streamlit as st
12
 
13
- client = boto3.client('s3')
 
 
 
 
 
 
14
 
15
 
16
  def plot_img_with_rects(
 
10
  import numpy.typing as npt
11
  import streamlit as st
12
 
13
+ AWS_ACCESS_KEY_ID = ''
14
+ AWS_SECRET_ACCESS_KEY = ''
15
+ if st.secrets is not None:
16
+ AWS_ACCESS_KEY_ID = st.secrets['AWS_ACCESS_KEY_ID']
17
+ AWS_SECRET_ACCESS_KEY = st.secrets['AWS_SECRET_ACCESS_KEY']
18
+
19
+ client = boto3.client('s3', aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY)
20
 
21
 
22
  def plot_img_with_rects(
app.py → st_app.py RENAMED
File without changes