payload = """Summarize the following text: Peter and Elizabeth took a taxi to attend the night party in the city. While in the party, Elizabeth collapsed and was rushed to the hospital. Since she was diagnosed with a brain injury, the doctor told Peter to stay besides her until she gets well. Therefore, Peter stayed with her at the hospital for 3 days without leaving. """ parameters = { "early_stopping": True, "length_penalty": 2.0, "max_new_tokens": 50, "temperature": 0, "min_length": 10, "no_repeat_ngram_size": 3, } # Run prediction predictor.predict({ "inputs": payload, "parameters" :parameters }) # [{'generated_text': 'Peter stayed with Elizabeth at the hospital for 3 days.'}]