pius-code commited on
Commit
4717636
·
1 Parent(s): 8008531

change summarize endpoint from POST to GET and update response message

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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.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 summary
 
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"