Spaces:
Runtime error
Runtime error
eliphatfs
commited on
Commit
β’
dcd2be7
1
Parent(s):
798f776
Fix login.
Browse files- app.py +4 -0
- requirements.txt +1 -0
app.py
CHANGED
@@ -6,8 +6,12 @@ import rembg
|
|
6 |
import urllib.request
|
7 |
from PIL import Image
|
8 |
import streamlit as st
|
|
|
9 |
|
10 |
|
|
|
|
|
|
|
11 |
img_example_counter = 0
|
12 |
iret_base = 'resources/examples'
|
13 |
iret = [
|
|
|
6 |
import urllib.request
|
7 |
from PIL import Image
|
8 |
import streamlit as st
|
9 |
+
import huggingface_hub
|
10 |
|
11 |
|
12 |
+
if 'HF_TOKEN' in os.environ:
|
13 |
+
huggingface_hub.login(os.environ['HF_TOKEN'])
|
14 |
+
|
15 |
img_example_counter = 0
|
16 |
iret_base = 'resources/examples'
|
17 |
iret = [
|
requirements.txt
CHANGED
@@ -7,4 +7,5 @@ diffusers==0.20.2
|
|
7 |
transformers==4.29.2
|
8 |
streamlit==1.22.0
|
9 |
altair<5
|
|
|
10 |
git+https://github.com/facebookresearch/segment-anything.git
|
|
|
7 |
transformers==4.29.2
|
8 |
streamlit==1.22.0
|
9 |
altair<5
|
10 |
+
huggingface_hub
|
11 |
git+https://github.com/facebookresearch/segment-anything.git
|