Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,22 @@ import streamlit as st
|
|
3 |
import streamlit.components.v1 as components
|
4 |
|
5 |
def semanticComparativeClassification():
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
headers = {"Authorization": "Bearer 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"}
|
8 |
#API_URL = "https://api-inference.huggingface.co/models/Maite89/Roberta_finetuning_semantic_similarity_stsb_multi_mt"
|
9 |
st.write("Log:")
|
10 |
def query(payload):
|
11 |
|
12 |
|
13 |
-
response = requests.post(
|
14 |
return response.json()
|
15 |
|
16 |
sentences = [
|
|
|
3 |
import streamlit.components.v1 as components
|
4 |
|
5 |
def semanticComparativeClassification():
|
6 |
+
apis_urls = [
|
7 |
+
"https://api-inference.huggingface.co/models/symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli"
|
8 |
+
]
|
9 |
+
|
10 |
+
for api_url in apis_urls:
|
11 |
+
semanticComparativeClassificationCall(api_url)
|
12 |
+
|
13 |
+
def semanticComparativeClassificationCall(api_url: str):
|
14 |
+
|
15 |
headers = {"Authorization": "Bearer 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"}
|
16 |
#API_URL = "https://api-inference.huggingface.co/models/Maite89/Roberta_finetuning_semantic_similarity_stsb_multi_mt"
|
17 |
st.write("Log:")
|
18 |
def query(payload):
|
19 |
|
20 |
|
21 |
+
response = requests.post(api_url, headers=headers, json=payload)
|
22 |
return response.json()
|
23 |
|
24 |
sentences = [
|