Spaces:
Runtime error
Runtime error
Update app.py
Browse filesFixed secret token access.
app.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
# %% Imports
|
| 2 |
from gradio_client import Client, file
|
| 3 |
import gradio as gr
|
|
|
|
| 4 |
|
| 5 |
# %% Connect to private MaskClassifier and set up API calls to get predictions
|
|
|
|
| 6 |
client = Client("maba11/MaskClassifier", hf_token=HF_TOKEN)
|
| 7 |
|
| 8 |
def predict_single_out(input):
|
|
|
|
| 1 |
# %% Imports
|
| 2 |
from gradio_client import Client, file
|
| 3 |
import gradio as gr
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
# %% Connect to private MaskClassifier and set up API calls to get predictions
|
| 7 |
+
HF_TOKEN = os.getenv(HF_TOKEN)
|
| 8 |
client = Client("maba11/MaskClassifier", hf_token=HF_TOKEN)
|
| 9 |
|
| 10 |
def predict_single_out(input):
|