Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,7 @@ import requests
|
|
2 |
import streamlit as st
|
3 |
import streamlit.components.v1 as components
|
4 |
import time
|
5 |
-
|
6 |
-
global container
|
7 |
st.session_state.mytext = ""
|
8 |
def semanticComparativeClassification():
|
9 |
st.session_state["respuesta"] = ""
|
@@ -61,15 +60,15 @@ def semanticComparativeClassificationCall(api_url: str):
|
|
61 |
|
62 |
#st.write(output)
|
63 |
if "error" in output:
|
64 |
-
st.session_state["log"] = st.session_state["log"] +
|
65 |
else:
|
66 |
index=0
|
67 |
for i in output:
|
68 |
-
st.session_state["log"] = st.session_state["log"]+i+' - '+sentences[index]+'\n'
|
69 |
#container.write(i," - ", sentences[index])
|
70 |
index = index + 1
|
71 |
maxim = max(output)
|
72 |
-
st.session_state["log"] = st.session_state["log"]+'MAX:', str(maxim),'\n'
|
73 |
|
74 |
sentenceindex = output.index(maxim)
|
75 |
|
|
|
2 |
import streamlit as st
|
3 |
import streamlit.components.v1 as components
|
4 |
import time
|
5 |
+
|
|
|
6 |
st.session_state.mytext = ""
|
7 |
def semanticComparativeClassification():
|
8 |
st.session_state["respuesta"] = ""
|
|
|
60 |
|
61 |
#st.write(output)
|
62 |
if "error" in output:
|
63 |
+
st.session_state["log"] = st.session_state["log"] + output["error"]+'\n'
|
64 |
else:
|
65 |
index=0
|
66 |
for i in output:
|
67 |
+
st.session_state["log"] = st.session_state["log"]+ i +' - '+sentences[index]+'\n'
|
68 |
#container.write(i," - ", sentences[index])
|
69 |
index = index + 1
|
70 |
maxim = max(output)
|
71 |
+
st.session_state["log"] = st.session_state["log"]+'MAX:', str(maxim),'\n'
|
72 |
|
73 |
sentenceindex = output.index(maxim)
|
74 |
|