fakeshield-api / backend /test_labels.py
Akash4911's picture
Production Deploy: Improved robustness and logging
66b6851
Raw
History Blame Contribute Delete
286 Bytes
import json
import urllib.request
url = "https://huggingface.co/Hello-SimpleAI/chatgpt-detector-roberta/resolve/main/config.json"
try:
response = urllib.request.urlopen(url)
data = json.loads(response.read())
print(data.get("id2label"))
except Exception as e:
print(e)