Subhraj07 commited on
Commit
602e944
·
1 Parent(s): 58c2f16

text updated on summery model

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,12 +16,12 @@ summarizer = pipeline("summarization", model="philschmid/bart-large-cnn-samsum")
16
  @app.get("/generate")
17
  def generate(text: str):
18
  """
19
- Using the text2text-generation pipeline from `transformers`, summerize text
20
  from the given input text. The model used is `philschmid/bart-large-cnn-samsum`, which
21
  can be found [here](<https://huggingface.co/philschmid/bart-large-cnn-samsum>).
22
  """
23
  # Use the pipeline to generate text from the given input text
24
- output = summarizer(conversation)
25
 
26
  # Return the generated text in a JSON response
27
  return {"output": output[0]["summary_text"]}
 
16
  @app.get("/generate")
17
  def generate(text: str):
18
  """
19
+ Using the text summarization pipeline from `transformers`, summerize text
20
  from the given input text. The model used is `philschmid/bart-large-cnn-samsum`, which
21
  can be found [here](<https://huggingface.co/philschmid/bart-large-cnn-samsum>).
22
  """
23
  # Use the pipeline to generate text from the given input text
24
+ output = summarizer(text)
25
 
26
  # Return the generated text in a JSON response
27
  return {"output": output[0]["summary_text"]}