Spaces:
Runtime error
Runtime error
mhdiqbalpradipta
commited on
Commit
•
03f7a50
1
Parent(s):
4647802
Update app.py
Browse files
app.py
CHANGED
@@ -2,12 +2,12 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
from fastapi import FastAPI
|
4 |
|
5 |
-
# Memuat model untuk klasifikasi makanan
|
6 |
food_classifier = pipeline(task="image-classification", model="mhdiqbalpradipta/minang_food_classification")
|
7 |
|
8 |
|
9 |
def prediksi_makanan(gambar):
|
10 |
-
# Melakukan prediksi menggunakan model
|
11 |
hasil = food_classifier(images=gambar)[0]
|
12 |
|
13 |
# Menyimpan label dan skor
|
|
|
2 |
from transformers import pipeline
|
3 |
from fastapi import FastAPI
|
4 |
|
5 |
+
# Memuat model untuk klasifikasi makanan padang
|
6 |
food_classifier = pipeline(task="image-classification", model="mhdiqbalpradipta/minang_food_classification")
|
7 |
|
8 |
|
9 |
def prediksi_makanan(gambar):
|
10 |
+
# Melakukan prediksi menggunakan model
|
11 |
hasil = food_classifier(images=gambar)[0]
|
12 |
|
13 |
# Menyimpan label dan skor
|