Spaces:
Sleeping
Sleeping
Uploading food classifier demo
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Lets Launch Sagar's demo on web
|
| 2 |
-
#
|
| 3 |
# app.py import packages , define gradio function, create demo, run demo with demo.launch
|
| 4 |
# %%writefile magic pyhton function
|
| 5 |
# Create Model Demo: Gradio App: inputs - model -output in gradio app
|
|
@@ -10,6 +10,10 @@
|
|
| 10 |
# 4 Return the output from the pipeline in step 3 as a formatted dictionary with the format {"label_1": probability_1, "label_2: probability_2"}
|
| 11 |
######################################################################################################################
|
| 12 |
# Import necessary packages
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
import pprint
|
| 14 |
from pathlib import Path
|
| 15 |
|
|
|
|
| 1 |
# Lets Launch Sagar's demo on web
|
| 2 |
+
# YAML metadata looks for app.py by default
|
| 3 |
# app.py import packages , define gradio function, create demo, run demo with demo.launch
|
| 4 |
# %%writefile magic pyhton function
|
| 5 |
# Create Model Demo: Gradio App: inputs - model -output in gradio app
|
|
|
|
| 10 |
# 4 Return the output from the pipeline in step 3 as a formatted dictionary with the format {"label_1": probability_1, "label_2: probability_2"}
|
| 11 |
######################################################################################################################
|
| 12 |
# Import necessary packages
|
| 13 |
+
import os
|
| 14 |
+
# This looks for the 'Secret' you just added in the Settings tab
|
| 15 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 16 |
+
|
| 17 |
import pprint
|
| 18 |
from pathlib import Path
|
| 19 |
|