Spaces:
Runtime error
Runtime error
Andrey
commited on
To hugging face (#9)
Browse files- README.md +12 -11
- src/utils.py +7 -1
- app.py → st_app.py +0 -0
README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|