pius-code commited on
Commit
0594f08
·
1 Parent(s): 8cf2fe4

change summarize endpoint from GET to POST and update response message

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -14,7 +14,7 @@ class TextInput(BaseModel):
14
  async def root():
15
  return {"message": "Welcome to the Text Summarization API!"}
16
 
17
- @app.get("/summarize")
18
  async def summarize_text(input: TextInput):
19
  summary = (summarizer(input.text, max_length=130, min_length=30, do_sample=False))
20
  return "hello welcome to the summary end point"
 
14
  async def root():
15
  return {"message": "Welcome to the Text Summarization API!"}
16
 
17
+ @app.post("/summarize")
18
  async def summarize_text(input: TextInput):
19
  summary = (summarizer(input.text, max_length=130, min_length=30, do_sample=False))
20
  return "hello welcome to the summary end point"