Update app.py
Browse files
app.py
CHANGED
|
@@ -145,24 +145,26 @@ if st.button('Analyze'):
|
|
| 145 |
answer += f"Answer {i+1}: {data['0'][i]['text']} -- \n"
|
| 146 |
answer += f"Probability: {round(data['0'][i]['probability']*100,1)}%\n\n"
|
| 147 |
st.success(answer)
|
| 148 |
-
|
|
|
|
|
|
|
| 149 |
else:
|
| 150 |
st.write("Unable to call model, please select question and contract")
|
| 151 |
|
| 152 |
-
if st.button('Check Sustainability'):
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
if st.button('Summarize'):
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
|
| 163 |
-
if st.button('NER'):
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
| 145 |
answer += f"Answer {i+1}: {data['0'][i]['text']} -- \n"
|
| 146 |
answer += f"Probability: {round(data['0'][i]['probability']*100,1)}%\n\n"
|
| 147 |
st.success(answer)
|
| 148 |
+
st.write(get_sustainability(raw_answer))
|
| 149 |
+
st.write(summarize_text(raw_answer))
|
| 150 |
+
st.write(displacy.render(doc, style="ent"))
|
| 151 |
else:
|
| 152 |
st.write("Unable to call model, please select question and contract")
|
| 153 |
|
| 154 |
+
#if st.button('Check Sustainability'):
|
| 155 |
+
# if(raw_answer==""):
|
| 156 |
+
# st.write("Unable to call model, please select question and contract")
|
| 157 |
+
# else:
|
| 158 |
+
# st.write(get_sustainability(raw_answer))
|
| 159 |
+
#if st.button('Summarize'):
|
| 160 |
+
# if(raw_answer==""):
|
| 161 |
+
# st.write("Unable to call model, please select question and contract")
|
| 162 |
+
# else:
|
| 163 |
+
# st.write(summarize_text(raw_answer))
|
| 164 |
|
| 165 |
+
#if st.button('NER'):
|
| 166 |
+
# if(raw_answer==""):
|
| 167 |
+
# st.write("Unable to call model, please select question and contract")
|
| 168 |
+
# else:
|
| 169 |
+
# doc = nlp(raw_answer)
|
| 170 |
+
# st.write(displacy.render(doc, style="ent"))
|