Spaces:
Runtime error
Runtime error
AmitPress
commited on
Commit
·
f190985
1
Parent(s):
d2eaa4a
st secrets
Browse files- app.py +1 -5
- requirements.txt +1 -3
app.py
CHANGED
@@ -2,11 +2,7 @@ from ultralytics import YOLO
|
|
2 |
import streamlit as st
|
3 |
from PIL import Image
|
4 |
import openai
|
5 |
-
|
6 |
-
import pygit
|
7 |
-
r = pygit.load_repo("https://huggingface.co/spaces/AmitPress/snake-detection")
|
8 |
-
repo = Repository(r)
|
9 |
-
secret_key = repo.get_secret('openapi')
|
10 |
openai.api_key(secret_key)
|
11 |
model = YOLO('resource/twenty-eight-first.pt')
|
12 |
|
|
|
2 |
import streamlit as st
|
3 |
from PIL import Image
|
4 |
import openai
|
5 |
+
secret_key = st.secrets["openapi"]
|
|
|
|
|
|
|
|
|
6 |
openai.api_key(secret_key)
|
7 |
model = YOLO('resource/twenty-eight-first.pt')
|
8 |
|
requirements.txt
CHANGED
@@ -3,6 +3,4 @@ ultralytics
|
|
3 |
pillow
|
4 |
requests
|
5 |
bs4
|
6 |
-
openai
|
7 |
-
huggingface_hub
|
8 |
-
python-git
|
|
|
3 |
pillow
|
4 |
requests
|
5 |
bs4
|
6 |
+
openai
|
|
|
|