Spaces:
Running on Zero
Running on Zero
Auto-deploy from GitHub Actions
Browse files
app.py
CHANGED
|
@@ -145,11 +145,6 @@ async def api_feedback(request: Request):
|
|
| 145 |
if not user_images:
|
| 146 |
return JSONResponse({"error": "could not decode frames"}, status_code=400)
|
| 147 |
|
| 148 |
-
try:
|
| 149 |
-
load_model()
|
| 150 |
-
except Exception as e:
|
| 151 |
-
return JSONResponse({"error": f"model load failed: {e}"}, status_code=500)
|
| 152 |
-
|
| 153 |
if ref_images:
|
| 154 |
prompt = (
|
| 155 |
f'You are an ASL coach. The student is learning to sign "{word}".\n'
|
|
@@ -205,11 +200,6 @@ async def api_describe(request: Request):
|
|
| 205 |
if not images:
|
| 206 |
return JSONResponse({"error": "bad frames"}, status_code=400)
|
| 207 |
|
| 208 |
-
try:
|
| 209 |
-
load_model()
|
| 210 |
-
except Exception as e:
|
| 211 |
-
return JSONResponse({"error": f"model load failed: {e}"}, status_code=500)
|
| 212 |
-
|
| 213 |
n = len(images)
|
| 214 |
prompt = (
|
| 215 |
f'These {n} images show the sequence of the ASL sign for "{word}" at 1 frame per second. '
|
|
|
|
| 145 |
if not user_images:
|
| 146 |
return JSONResponse({"error": "could not decode frames"}, status_code=400)
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
if ref_images:
|
| 149 |
prompt = (
|
| 150 |
f'You are an ASL coach. The student is learning to sign "{word}".\n'
|
|
|
|
| 200 |
if not images:
|
| 201 |
return JSONResponse({"error": "bad frames"}, status_code=400)
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
n = len(images)
|
| 204 |
prompt = (
|
| 205 |
f'These {n} images show the sequence of the ASL sign for "{word}" at 1 frame per second. '
|