Spaces:
Runtime error
Runtime error
File size: 401 Bytes
c73da75 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import requests
import json
url = 'https://hf.space/embed/rkrstacic/Software-module-for-answering-questions-on-processes/+/api/predict'
def _query(payload):
data = json.dumps(payload)
response = requests.request("POST", url, data=data)
return json.loads(response.content.decode("utf-8"))
def get_answer(question, process):
return _query({"data": [question, process]})["data"][0]
|