Spaces:
Running
Running
feat: hides model id
Browse files
app.py
CHANGED
|
@@ -7,8 +7,8 @@ import gradio as gr
|
|
| 7 |
load_dotenv()
|
| 8 |
|
| 9 |
key = os.getenv("API_KEY")
|
| 10 |
-
|
| 11 |
-
pipe = pipeline("image-classification", model=
|
| 12 |
|
| 13 |
def classify_image(image):
|
| 14 |
# [{'label': 'quartz', 'score': 0.20238091051578522}, {'label': 'celestine', 'score': 0.11984242498874664},
|
|
|
|
| 7 |
load_dotenv()
|
| 8 |
|
| 9 |
key = os.getenv("API_KEY")
|
| 10 |
+
model_id = os.getenv("MODEL_ID")
|
| 11 |
+
pipe = pipeline("image-classification", model=model_id, device='cpu', token=key)
|
| 12 |
|
| 13 |
def classify_image(image):
|
| 14 |
# [{'label': 'quartz', 'score': 0.20238091051578522}, {'label': 'celestine', 'score': 0.11984242498874664},
|