text updated on summery model
Browse files15 unmodified lines161718191920212223242425262715 unmodified lines@app.get("/generate")def generate(text: str): """ Using the text2text-generation pipeline from `transformers`, summerize text Using the text summarization pipeline from `transformers`, summerize text from the given input text. The model used is `philschmid/bart-large-cnn-samsum`, which can be found [here](<https://huggingface.co/philschmid/bart-large-cnn-samsum>). """ # Use the pipeline to generate text from the given input text output = summarizer(conversation) output = summarizer(text) # Return the generated text in a JSON response return {"output": output[0]["summary_text"]}app.py+2-2