Change stub structure
Browse files- backend/runner/app.py +8 -2
backend/runner/app.py
CHANGED
|
@@ -381,10 +381,16 @@ def get_models():
|
|
| 381 |
@app.route("/cell-sim", methods=["GET"])
|
| 382 |
def cell_similarity():
|
| 383 |
if STUB_MODE:
|
| 384 |
-
# Return stub results
|
| 385 |
return jsonify({
|
| 386 |
"sentences": [
|
| 387 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
for i in range(1, 6)
|
| 389 |
]
|
| 390 |
})
|
|
|
|
| 381 |
@app.route("/cell-sim", methods=["GET"])
|
| 382 |
def cell_similarity():
|
| 383 |
if STUB_MODE:
|
| 384 |
+
# Return stub results that match the expected frontend structure
|
| 385 |
return jsonify({
|
| 386 |
"sentences": [
|
| 387 |
+
{
|
| 388 |
+
"sentence_id": f"W123_s{i:04d}",
|
| 389 |
+
"english_original": f"Stub cell sentence {i} for testing.",
|
| 390 |
+
"work": "W123",
|
| 391 |
+
"score": 0.9 - i*0.01,
|
| 392 |
+
"rank": i
|
| 393 |
+
}
|
| 394 |
for i in range(1, 6)
|
| 395 |
]
|
| 396 |
})
|