Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ import streamlit as st
|
|
| 14 |
from PIL import Image
|
| 15 |
|
| 16 |
image = Image.open('Wipro logo.png')
|
| 17 |
-
st.image(image
|
| 18 |
|
| 19 |
st.title("Wipro Impact | CSRD | Advisor")
|
| 20 |
|
|
@@ -105,14 +105,19 @@ def colorizedtext(acolor, astring):
|
|
| 105 |
formattedcolor = ":" + acolor + "[" + astring + "]"
|
| 106 |
return formattedcolor
|
| 107 |
|
|
|
|
| 108 |
|
| 109 |
if st.button("Ask QA "):
|
| 110 |
documents = loader1.load()
|
| 111 |
answer = ""
|
| 112 |
-
with st.spinner(" Finding answer for your question " ):
|
| 113 |
-
st.write("AI is reading this [link](%s)" % url)
|
| 114 |
with st.expander( "Employing your choice of AI method ... " + aimethod + "..."):
|
| 115 |
-
st.write(str(chain)[:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
st.subheader(colorizedtext("red", yourquestion))
|
| 117 |
|
| 118 |
|
|
|
|
| 14 |
from PIL import Image
|
| 15 |
|
| 16 |
image = Image.open('Wipro logo.png')
|
| 17 |
+
st.image(image)
|
| 18 |
|
| 19 |
st.title("Wipro Impact | CSRD | Advisor")
|
| 20 |
|
|
|
|
| 105 |
formattedcolor = ":" + acolor + "[" + astring + "]"
|
| 106 |
return formattedcolor
|
| 107 |
|
| 108 |
+
|
| 109 |
|
| 110 |
if st.button("Ask QA "):
|
| 111 |
documents = loader1.load()
|
| 112 |
answer = ""
|
| 113 |
+
with st.spinner(" Finding answer for your question .... AI will get you answer in 2 more minutes... " ):
|
|
|
|
| 114 |
with st.expander( "Employing your choice of AI method ... " + aimethod + "..."):
|
| 115 |
+
st.write(str(chain)[:700])
|
| 116 |
+
st.write("AI is reading this [link](%s)" % url)
|
| 117 |
+
prgpgress = st.progress(0)
|
| 118 |
+
for i in range(100):
|
| 119 |
+
time.sleep(0.1)
|
| 120 |
+
prgpgress.progress(i+1)
|
| 121 |
st.subheader(colorizedtext("red", yourquestion))
|
| 122 |
|
| 123 |
|