hantupocong commited on
Commit
f61da19
·
verified ·
1 Parent(s): a76c3d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -206,10 +206,8 @@ def predict(text, threshold):
206
  else:
207
  checks.append(f"\n⚠️ No YouTube video found for “{cleaned_text}” — the predicted pose is based on the model’s learned approximation.")
208
 
209
- # === Embed auto-playing video ===
210
- video_html = f'<video autoplay loop muted playsinline width="100%" src="{path}"></video>'
211
-
212
- return video_html, msg + "\n" + "\n".join(checks)
213
 
214
  except Exception as e:
215
  print("Error during prediction:", e)
@@ -223,7 +221,7 @@ gr.Interface(
223
  gr.Slider(0.0, 1.0, value=0.05, step=0.05, label="Confidence Threshold (for displaying joints)")
224
  ],
225
  outputs=[
226
- gr.HTML(label="Predicted Pose Animation (Auto-play)"),
227
  gr.Markdown(label="Word Check + YouTube Reference")
228
  ],
229
  title="Text-to-Malay Sign Pose Generator",
 
206
  else:
207
  checks.append(f"\n⚠️ No YouTube video found for “{cleaned_text}” — the predicted pose is based on the model’s learned approximation.")
208
 
209
+
210
+ return path, msg + "\n" + "\n".join(checks)
 
 
211
 
212
  except Exception as e:
213
  print("Error during prediction:", e)
 
221
  gr.Slider(0.0, 1.0, value=0.05, step=0.05, label="Confidence Threshold (for displaying joints)")
222
  ],
223
  outputs=[
224
+ gr.Video(label="Generated Pose Animation"),
225
  gr.Markdown(label="Word Check + YouTube Reference")
226
  ],
227
  title="Text-to-Malay Sign Pose Generator",