Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -28,10 +28,10 @@ async def root():
|
|
| 28 |
|
| 29 |
return HTMLResponse(content=body)
|
| 30 |
|
| 31 |
-
@app.get("/api")
|
| 32 |
-
async def cal_api():
|
| 33 |
|
| 34 |
-
input_text = "my name is clara i live in berkeley california"
|
| 35 |
|
| 36 |
model = PunctuationModel()
|
| 37 |
output_text = model.restore_punctuation(input_text)
|
|
@@ -46,7 +46,7 @@ async def cal_api():
|
|
| 46 |
|
| 47 |
return {"data": pcnt_file_cr_cap}
|
| 48 |
|
| 49 |
-
@app.get("/
|
| 50 |
async def read_item(item_id):
|
| 51 |
return {"item_id": item_id}
|
| 52 |
|
|
|
|
| 28 |
|
| 29 |
return HTMLResponse(content=body)
|
| 30 |
|
| 31 |
+
@app.get("/api/{input_text}")
|
| 32 |
+
async def cal_api(input_text):
|
| 33 |
|
| 34 |
+
#input_text = "my name is clara i live in berkeley california"
|
| 35 |
|
| 36 |
model = PunctuationModel()
|
| 37 |
output_text = model.restore_punctuation(input_text)
|
|
|
|
| 46 |
|
| 47 |
return {"data": pcnt_file_cr_cap}
|
| 48 |
|
| 49 |
+
@app.get("/item/{item_id}")
|
| 50 |
async def read_item(item_id):
|
| 51 |
return {"item_id": item_id}
|
| 52 |
|