SiyaYan commited on
Commit
3c92847
·
verified ·
1 Parent(s): c6b0dc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -97,6 +97,11 @@ def predict(img):
97
  # ============================
98
  # Gradio UI (Webcam + Upload)
99
  # ============================
 
 
 
 
 
100
  demo = gr.Interface(
101
  fn=predict,
102
  inputs=gr.Image(type="pil", sources=["upload", "webcam"], label="Face Photo"),
 
97
  # ============================
98
  # Gradio UI (Webcam + Upload)
99
  # ============================
100
+ ds = load_dataset("TristanKE/RemainingLifespanPredictionFaces", split="train")
101
+ sample = ds[1]
102
+ img, target = sample["image"], sample["remaining_lifespan"]
103
+ img.save("example.jpg")
104
+
105
  demo = gr.Interface(
106
  fn=predict,
107
  inputs=gr.Image(type="pil", sources=["upload", "webcam"], label="Face Photo"),