Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,21 +17,12 @@ import time
|
|
17 |
image = Image.open('Wipro logo.png')
|
18 |
st.image(image)
|
19 |
|
20 |
-
st.title("Wipro impact | The inquisitive sustainability leader
|
21 |
|
|
|
22 |
|
23 |
-
st.header("Welcome!. Today, What company's sustainability story is inspiring you ?.. ")
|
24 |
|
25 |
-
|
26 |
-
myurl = st.text_input("Give the URL to find a sustainability or annual report", "https://www.wipro.com/content/dam/nexus/en/sustainability/sustainability_reports/wipro-sustainability-report-fy-2021-22.pdf")
|
27 |
-
|
28 |
-
|
29 |
-
yourquestion = st.text_input('Ask your question on best practices', 'What is Wipro plans for Biodiversity in 2024?')
|
30 |
-
st.write('Your input is ', yourquestion)
|
31 |
-
|
32 |
-
aimethod = st.radio(
|
33 |
-
"Choose a AI brain",
|
34 |
-
('GPT3', 'GPT3.5' ), index=1)
|
35 |
|
36 |
|
37 |
os.environ['OPENAI_API_TYPE'] = 'azure'
|
@@ -51,6 +42,8 @@ with st.form("my_form"):
|
|
51 |
# Every form must have a submit button.
|
52 |
submitted = st.form_submit_button("Ask question")
|
53 |
if submitted:
|
|
|
|
|
54 |
if myurl:
|
55 |
index = None
|
56 |
loader1 = PyPDFLoader(myurl)
|
@@ -65,7 +58,7 @@ with st.form("my_form"):
|
|
65 |
vectorstore_cls=Chroma
|
66 |
).from_loaders([loader1])
|
67 |
|
68 |
-
st.write("
|
69 |
|
70 |
|
71 |
|
|
|
17 |
image = Image.open('Wipro logo.png')
|
18 |
st.image(image)
|
19 |
|
20 |
+
st.title("Wipro impact | The inquisitive sustainability leader")
|
21 |
|
22 |
+
st.header("Learn some of the best practices in sustainability from success stories of leading companies.. ")
|
23 |
|
|
|
24 |
|
25 |
+
st.subheader("Welcome!. Today, What company's sustainability story is inspiring you ?.. ")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
|
28 |
os.environ['OPENAI_API_TYPE'] = 'azure'
|
|
|
42 |
# Every form must have a submit button.
|
43 |
submitted = st.form_submit_button("Ask question")
|
44 |
if submitted:
|
45 |
+
st.write("AI is looking for the answer...It will take atleast 2 mintutes... Answers will appear below....")
|
46 |
+
|
47 |
if myurl:
|
48 |
index = None
|
49 |
loader1 = PyPDFLoader(myurl)
|
|
|
58 |
vectorstore_cls=Chroma
|
59 |
).from_loaders([loader1])
|
60 |
|
61 |
+
st.write("indexed PDF...AI finding answer....please wait")
|
62 |
|
63 |
|
64 |
|