Spaces:
Sleeping
Sleeping
import requests | |
import json | |
from pydantic import BaseModel | |
class Item(BaseModel): | |
text: str = "I miss you" | |
url = "https://tensorgirl-text-emotion.hf.space/classify/" | |
input_data = Item(text='I miss you') | |
response = requests.post(url, json = input_data.dict()) | |
print(response.text) |