ruminasval commited on
Commit
1b31555
·
verified ·
1 Parent(s): ec300a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -133,7 +133,7 @@ def predict(image):
133
  inputs = preprocess_image(image)
134
  if inputs is None:
135
  elapsed_ms = (time.perf_counter() - start) * 1000
136
- return "Unknown", "⚠️ Wajah tidak terdeteksi.", [], f"{elapsed_ms:.2f} ms"
137
 
138
  inputs = inputs.unsqueeze(0).to(device)
139
  with torch.no_grad():
@@ -180,8 +180,8 @@ def predict(image):
180
  # 9. Gradio UI
181
  # -----------------------------
182
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
183
- gr.Markdown("# 👓 Program Rekomendasi Kacamata Berdasarkan Bentuk Wajah")
184
- gr.Markdown("Upload foto wajahmu untuk mendapatkan prediksi bentuk wajah dan rekomendasi kacamata.")
185
 
186
  with gr.Row():
187
  with gr.Column():
 
133
  inputs = preprocess_image(image)
134
  if inputs is None:
135
  elapsed_ms = (time.perf_counter() - start) * 1000
136
+ return "Unknown", "Wajah tidak terdeteksi.", [], f"{elapsed_ms:.2f} ms"
137
 
138
  inputs = inputs.unsqueeze(0).to(device)
139
  with torch.no_grad():
 
180
  # 9. Gradio UI
181
  # -----------------------------
182
  with gr.Blocks(theme=gr.themes.Soft()) as iface:
183
+ gr.Markdown("# Program Rekomendasi Bentuk Kacamata")
184
+ gr.Markdown("Pastikan foto yang diunggah dapat terlihat jelas bagian wajah. Pastikan hanya menampilkan satu orang atau wajah untuk satu proses deteksi")
185
 
186
  with gr.Row():
187
  with gr.Column():