Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import requests
|
2 |
import streamlit as st
|
3 |
import streamlit.components.v1 as components
|
|
|
4 |
|
5 |
def semanticComparativeClassification():
|
6 |
apis_urls = [
|
@@ -12,7 +13,7 @@ def semanticComparativeClassification():
|
|
12 |
semanticComparativeClassificationCall(api_url)
|
13 |
|
14 |
def semanticComparativeClassificationCall(api_url: str):
|
15 |
-
|
16 |
headers = {"Authorization": "Bearer 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"}
|
17 |
#API_URL = "https://api-inference.huggingface.co/models/Maite89/Roberta_finetuning_semantic_similarity_stsb_multi_mt"
|
18 |
st.write("Log:")
|
@@ -65,7 +66,7 @@ def semanticComparativeClassificationCall(api_url: str):
|
|
65 |
st.session_state["respuesta"]= "Tema reconocido: "+str(sentences[sentenceindex])
|
66 |
|
67 |
|
68 |
-
|
69 |
|
70 |
#x = st.slider('Select a value')
|
71 |
#st.write(x, 'squared is', x * x)
|
|
|
1 |
import requests
|
2 |
import streamlit as st
|
3 |
import streamlit.components.v1 as components
|
4 |
+
import time
|
5 |
|
6 |
def semanticComparativeClassification():
|
7 |
apis_urls = [
|
|
|
13 |
semanticComparativeClassificationCall(api_url)
|
14 |
|
15 |
def semanticComparativeClassificationCall(api_url: str):
|
16 |
+
st.write("Model: ", api_url)
|
17 |
headers = {"Authorization": "Bearer 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"}
|
18 |
#API_URL = "https://api-inference.huggingface.co/models/Maite89/Roberta_finetuning_semantic_similarity_stsb_multi_mt"
|
19 |
st.write("Log:")
|
|
|
66 |
st.session_state["respuesta"]= "Tema reconocido: "+str(sentences[sentenceindex])
|
67 |
|
68 |
|
69 |
+
time.sleep(5)
|
70 |
|
71 |
#x = st.slider('Select a value')
|
72 |
#st.write(x, 'squared is', x * x)
|