Spaces:
Sleeping
Sleeping
MingGatsby
commited on
Commit
•
f5a2af2
1
Parent(s):
df57906
Update query.py
Browse files
query.py
CHANGED
@@ -72,7 +72,7 @@ def plot_response(df, plot_title):
|
|
72 |
|
73 |
|
74 |
def query(text):
|
75 |
-
API_URL = "https://api-inference.huggingface.co/models/j-hartmann/emotion-english-
|
76 |
headers = {"Authorization": "Bearer " + os.environ["HF_API_KEY"]}
|
77 |
payload = {"inputs": text}
|
78 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
72 |
|
73 |
|
74 |
def query(text):
|
75 |
+
API_URL = "https://api-inference.huggingface.co/models/j-hartmann/emotion-english-roberta-large"
|
76 |
headers = {"Authorization": "Bearer " + os.environ["HF_API_KEY"]}
|
77 |
payload = {"inputs": text}
|
78 |
response = requests.post(API_URL, headers=headers, json=payload)
|