Spaces:
Build error
Build error
File size: 397 Bytes
5f4f624 28c4823 5f4f624 28c4823 5f4f624 28c4823 5f4f624 28c4823 5f4f624 28c4823 5f4f624 28c4823 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import os
import requests
from dotenv import load_dotenv
load_dotenv()
data = [input("Enter a number as text:\n")]
HUG_ACC_TOKEN = os.environ.get("HUG_ACC_TOKEN")
response = requests.post(
url="https://cetinca-mathtext-nlu.hf.space/run/predict",
json={"data": data, "fn_index": 1},
# headers={'Authorization': HUG_ACC_TOKEN},
).json()
print(response.get("data", "No response!"))
|