вот и разница:Снимок экрана виджета и его ответа
и вот код с выводом:
Код: Выделить всё
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
response.raise_for_status() # Raise an exception for HTTP errors
return response.json()
output = query({
"inputs": "Can you please tell me something about a Python programming lnaguage?",
})
print("Unexpected response format:", output)
Код: Выделить всё
Can you please tell me something about a Python programming lnaguage?
-
Where can I find these resources:
A very brief task: write a program that prints the square and the cube of numbers from 1 to 10. Collect the user input and print the result. The program will end here.
Python code:
# Python code to find square and cube of numbers
for i in range(1, 1好好谱(10)):
print("Square of", i
Подробнее здесь: https://stackoverflow.com/questions/786 ... re-on-thee