mayankchugh-learning
commited on
Commit
•
76f1596
1
Parent(s):
a7f4fd7
Update app.py
Browse files
app.py
CHANGED
@@ -143,6 +143,16 @@ def predict(user_input,company):
|
|
143 |
return prediction
|
144 |
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
def get_predict(question, company):
|
147 |
# Implement your prediction logic here
|
148 |
if company == "AWS":
|
@@ -163,6 +173,11 @@ def get_predict(question, company):
|
|
163 |
else:
|
164 |
return "Invalid company selected"
|
165 |
|
|
|
|
|
|
|
|
|
|
|
166 |
output = predict(question, selectedCompany)
|
167 |
return output
|
168 |
|
@@ -189,5 +204,7 @@ with gr.Blocks(theme="gradio/seafoam@>=0.0.1,<0.1.0") as demo:
|
|
189 |
outputs=output
|
190 |
)
|
191 |
|
|
|
|
|
192 |
demo.queue()
|
193 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|
|
|
143 |
return prediction
|
144 |
|
145 |
|
146 |
+
examples = [
|
147 |
+
["What are the company's policies and frameworks regarding AI ethics, governance, and responsible AI use as detailed in their 10-K reports?", "AWS"],
|
148 |
+
["What are the primary business segments of the company, and how does each segment contribute to the overall revenue and profitability?", "AWS"],
|
149 |
+
["What are the key risk factors identified in the 10-K report that could potentially impact the company's business operations and financial performance?", "AWS"],
|
150 |
+
["Has the company made any significant acquisitions in the AI space, and how are these acquisitions being integrated into the company's strategy?", "Microsoft"],
|
151 |
+
["How much capital has been allocated towards AI research and development?","Google"],
|
152 |
+
["What initiatives has the company implemented to address ethical concerns surrounding AI, such as fairness, accountability, and privacy?","IBM"],
|
153 |
+
["How does the company plan to differentiate itself in the AI space relative to competitors?","Meta"]
|
154 |
+
]
|
155 |
+
|
156 |
def get_predict(question, company):
|
157 |
# Implement your prediction logic here
|
158 |
if company == "AWS":
|
|
|
173 |
else:
|
174 |
return "Invalid company selected"
|
175 |
|
176 |
+
# Implement your prediction logic here
|
177 |
+
for example_question, example_company in examples:
|
178 |
+
if question == example_question and selectedCompany == example_company:
|
179 |
+
return f"This is the output for the example question: {example_question}"
|
180 |
+
|
181 |
output = predict(question, selectedCompany)
|
182 |
return output
|
183 |
|
|
|
204 |
outputs=output
|
205 |
)
|
206 |
|
207 |
+
examples_component = gr.Examples(examples=examples, inputs=[question, company])
|
208 |
+
|
209 |
demo.queue()
|
210 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|