I am facing these weird problems while calling the API using JavaScript. Example…
Model - EleutherAI/gpt-neo-2.7B
Input - { inputs: 'cat jumps over the mouse ’ }
Output -
[
{
generated_text: “import React from ‘react’;\n” +
“import { get } from ‘lodash’;\n” +
“import { getText, getLanguage } from ‘…/…/…/…/…/utils/utils’;\n” +
“import { Component } from '…/…/…/components”
}
]

Model - facebook/bart-large-cnn
input -
{
inputs: ‘The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.’
}
output -
[
{
summary_text: ‘CNN.com will feature iReporter.com in a iReporters gallery next week. Please send photos of your pets to iReport.com.    i-Reporters. i-Photography.com is a team of journalists at the U.S. Embassy in Washington, DC.’
}
]
This happens every time, no matter the input. The same thing works fine when calling the API from python.