Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ st.title("Wipro impact | The inquisitive sustainability leader: Learn some of t
|
|
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", "
|
27 |
|
28 |
yourquestion = st.text_input('Ask your question on best practices', 'What is Wipro plans for Biodiversity in 2024?')
|
29 |
st.write('Your input is ', yourquestion)
|
@@ -36,8 +36,8 @@ aimethod = st.radio(
|
|
36 |
os.environ['OPENAI_API_TYPE'] = 'azure'
|
37 |
os.environ['OPENAI_API_VERSION'] = '2023-03-15-preview'
|
38 |
|
39 |
-
|
40 |
-
llmchatgpt = AzureOpenAI( deployment_name="esujnand", model_name="gpt-35-turbo" )
|
41 |
|
42 |
if myurl:
|
43 |
index = None
|
@@ -59,7 +59,7 @@ if myurl:
|
|
59 |
|
60 |
|
61 |
if yourquestion:
|
62 |
-
answer = index.query(llm=
|
63 |
st.write(answer)
|
64 |
|
65 |
|
|
|
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 |
yourquestion = st.text_input('Ask your question on best practices', 'What is Wipro plans for Biodiversity in 2024?')
|
29 |
st.write('Your input is ', yourquestion)
|
|
|
36 |
os.environ['OPENAI_API_TYPE'] = 'azure'
|
37 |
os.environ['OPENAI_API_VERSION'] = '2023-03-15-preview'
|
38 |
|
39 |
+
llmgpt3 = AzureOpenAI( deployment_name="testdavanci", model_name="text-davinci-003" )
|
40 |
+
#llmchatgpt = AzureOpenAI( deployment_name="esujnand", model_name="gpt-35-turbo" )
|
41 |
|
42 |
if myurl:
|
43 |
index = None
|
|
|
59 |
|
60 |
|
61 |
if yourquestion:
|
62 |
+
answer = index.query(llm=llmgpt3, question=yourquestion, chain_type="map_reduce")
|
63 |
st.write(answer)
|
64 |
|
65 |
|