Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -107,10 +107,13 @@ def llm_one_sentence(structured: Dict[str, Any]) -> str:
|
|
| 107 |
it would stay in the air for {time_of_flight_s} s, reach {max_height_m} m, travel {range_m} m, and impact at {impact_speed_mps} m/s.
|
| 108 |
'''
|
| 109 |
|
| 110 |
-
user_msg =
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
# ✅ Use the tokenizer's chat template
|
| 116 |
messages = [
|
|
|
|
| 107 |
it would stay in the air for {time_of_flight_s} s, reach {max_height_m} m, travel {range_m} m, and impact at {impact_speed_mps} m/s.
|
| 108 |
'''
|
| 109 |
|
| 110 |
+
user_msg = "
|
| 111 |
+
".join([
|
| 112 |
+
"JSON:",
|
| 113 |
+
json.dumps(payload, indent=2),
|
| 114 |
+
"",
|
| 115 |
+
"Produce the single sentence as specified."
|
| 116 |
+
])
|
| 117 |
|
| 118 |
# ✅ Use the tokenizer's chat template
|
| 119 |
messages = [
|