Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- app.py +36 -34
- outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--1651681628346444407.txt +1 -0
- outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8662589002880032977.txt +1 -0
- outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8816113149947165191.txt +1 -0
- outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-7102211584855250932.txt +1 -0
- outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-8699972586918080875.txt +1 -0
- statics/__pycache__/style.cpython-311.pyc +0 -0
- statics/style.py +2 -2
__pycache__/app.cpython-311.pyc
CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -7,15 +7,15 @@ from statics.style import *
|
|
7 |
|
8 |
|
9 |
check_openai_api_key()
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
def run_agent(task, agent, report_type):
|
16 |
-
global
|
17 |
-
|
18 |
-
|
19 |
assistant = ResearchAgent(task, agent)
|
20 |
yield from assistant.write_report(report_type)
|
21 |
|
@@ -26,8 +26,8 @@ with gr.Blocks(theme=gr.themes.Base(),
|
|
26 |
gr.HTML(top_bar)
|
27 |
with gr.Tab(label="🔦Report"):
|
28 |
with gr.Column():
|
29 |
-
gr.HTML(
|
30 |
-
|
31 |
elem_classes="output")
|
32 |
with gr.Row():
|
33 |
agent_type = gr.Dropdown(label="# Agent Type",
|
@@ -60,40 +60,42 @@ with gr.Blocks(theme=gr.themes.Base(),
|
|
60 |
"What are the most recent advancements in the domain of superconductors as of 2023?"],
|
61 |
inputs=input_box)
|
62 |
|
63 |
-
with gr.Accordion(label="#
|
64 |
-
|
65 |
|
66 |
-
def
|
67 |
-
global
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
return
|
74 |
|
75 |
-
submit_btn.click(run_agent, inputs=[input_box, agent_type, report_type], outputs=
|
76 |
-
.then(
|
77 |
-
|
78 |
-
|
79 |
with gr.Tab("✒️English Polishing"):
|
80 |
gr.HTML(english_polishing_html)
|
81 |
-
polished_result = gr.Markdown("  
|
82 |
sentences = gr.Textbox(label="# What would you like to polish?", placeholder="Enter your sentence here")
|
83 |
|
84 |
with gr.Row():
|
85 |
polish_btn = gr.Button("Polish", elem_id="primary-btn")
|
86 |
-
save_btn = gr.Button("Save", elem_id="primary-btn")
|
87 |
-
|
88 |
-
polish_btn.click(english_polishing, inputs=[sentences], outputs=polished_result)
|
89 |
-
|
90 |
-
def save_result(history, origin, result):
|
91 |
-
history += f"\n**Origin** : {origin}\n\n**Polished Result** : {result}"
|
92 |
-
return history
|
93 |
|
94 |
-
gr.
|
95 |
-
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
with gr.Tab("📑Literature Review"):
|
99 |
gr.HTML(literature_review_html)
|
|
|
7 |
|
8 |
|
9 |
check_openai_api_key()
|
10 |
+
report_history_buffer = ""
|
11 |
+
report_history_num = 0
|
12 |
+
report_history_tasks = []
|
13 |
+
polish_history_buffer = ""
|
14 |
|
15 |
def run_agent(task, agent, report_type):
|
16 |
+
global report_history_num, report_history_tasks
|
17 |
+
report_history_num += 1
|
18 |
+
report_history_tasks.append(task)
|
19 |
assistant = ResearchAgent(task, agent)
|
20 |
yield from assistant.write_report(report_type)
|
21 |
|
|
|
26 |
gr.HTML(top_bar)
|
27 |
with gr.Tab(label="🔦Report"):
|
28 |
with gr.Column():
|
29 |
+
gr.HTML(report_html)
|
30 |
+
report = gr.Markdown(value=" Report will appear here...",
|
31 |
elem_classes="output")
|
32 |
with gr.Row():
|
33 |
agent_type = gr.Dropdown(label="# Agent Type",
|
|
|
60 |
"What are the most recent advancements in the domain of superconductors as of 2023?"],
|
61 |
inputs=input_box)
|
62 |
|
63 |
+
with gr.Accordion(label="# Report History", elem_id="history", open=False):
|
64 |
+
report_history = gr.Markdown()
|
65 |
|
66 |
+
def store_report(content):
|
67 |
+
global report_history_num, report_history_tasks, report_history_buffer
|
68 |
+
report_history_buffer += f'<details> \
|
69 |
+
<summary>Research History {report_history_num}: \
|
70 |
+
<i>{report_history_tasks[-1]}</i></summary> \
|
71 |
+
<div id="history_box">{content}</div> \
|
72 |
+
</details>'
|
73 |
+
return report_history_buffer
|
74 |
|
75 |
+
submit_btn.click(run_agent, inputs=[input_box, agent_type, report_type], outputs=report)\
|
76 |
+
.then(store_report, inputs=[report], outputs=report_history)
|
77 |
+
|
|
|
78 |
with gr.Tab("✒️English Polishing"):
|
79 |
gr.HTML(english_polishing_html)
|
80 |
+
polished_result = gr.Markdown(" Polished result will appear here...", elem_classes="output")
|
81 |
sentences = gr.Textbox(label="# What would you like to polish?", placeholder="Enter your sentence here")
|
82 |
|
83 |
with gr.Row():
|
84 |
polish_btn = gr.Button("Polish", elem_id="primary-btn")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
+
with gr.Accordion(label="# Polishing History", elem_id="history", open=False):
|
87 |
+
polish_history = gr.Markdown()
|
88 |
+
|
89 |
+
def store_polished_result(origin, result):
|
90 |
+
global polish_history_buffer
|
91 |
+
polish_history_buffer += f'<details> \
|
92 |
+
<summary><i>{origin}</i></summary> \
|
93 |
+
<div id="history_box">{result}</div> \
|
94 |
+
</details>'
|
95 |
+
return polish_history_buffer
|
96 |
+
|
97 |
+
polish_btn.click(english_polishing, inputs=[sentences], outputs=polished_result) \
|
98 |
+
.then(store_polished_result, inputs=[sentences, polished_result], outputs=polish_history)
|
99 |
|
100 |
with gr.Tab("📑Literature Review"):
|
101 |
gr.HTML(literature_review_html)
|
outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--1651681628346444407.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[{"title": "Trends in electric vehicles: what can we expect in 2023?", "href": "https://evmagazine.com/mobility/trends-in-electric-vehicles-what-can-we-expect-in-2023", "body": "Opinion piece provided by Sammie Eastwood, Guest Editor. A lot has happened in 2022 when it comes to the world of electric vehicles (EVs), and 2023 is set to be even bigger bringing more advancements in the EV market.Technology in the sector is moving in leaps and bounds, and, despite supply chain disruptions putting strain on manufacturers, 2023 is set to be one of the best years for electric ..."}, {"title": "3 Predictions For Electric Vehicles In 2023 - Forbes", "href": "https://www.forbes.com/sites/jamesmorris/2022/12/31/3-predictions-for-electric-vehicles-in-2023/", "body": "Forbes Innovation Sustainability 3 Predictions For Electric Vehicles In 2023 James Morris Contributor I write about the rapidly growing world of electric vehicles Dec 31, 2022,05:00am..."}, {"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023. Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}]
|
outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8662589002880032977.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[{"title": "Electric vehicles", "href": "https://www2.deloitte.com/us/en/insights/focus/future-of-mobility/electric-vehicle-trends-2030.html", "body": "Since Deloitte last presented a forecast for electric vehicle (EV) sales, in January 2019, the EV market has made great strides, and not just in terms of sales. OEMs have invested billions to deliver new electrified models, from R&D to factory redesign. Consumer attitudes have evolved. Government interventions have pushed forward and pulled back."}, {"title": "Driving into 2025: The Future of Electric Vehicles | J.P. Morgan", "href": "https://www.jpmorgan.com/insights/research/electric-vehicles", "body": "Comparatively, in 2016 just under 1 million vehicles or 1% of global auto sales came from plug-in electric vehicles (PEVs). 1. By 2025, J.P. Morgan estimates this will rise close to 8.4 million vehicles or a 7.7% market share. While this jump is significant, it doesn't compare to the kind of growth expected in HEVs - cars that combine a fuel ..."}, {"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023 Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}]
|
outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8816113149947165191.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[{"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023 Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}, {"title": "3 Picks & Shovels Ways to Play the EV Sector in 2023", "href": "https://investorplace.com/2023/08/3-picks-shovels-ways-to-play-the-ev-sector-in-2023/", "body": "There are many ways to profit off of this sector, and here are three of the best. The EV market is one of the best sectors to look into and invest in, and here are three of our picks. Lithium ..."}, {"title": "Inside the $455 billion U.S. investment in electric vehicles", "href": "https://pv-magazine-usa.com/2023/01/17/inside-the-455-billion-u-s-investment-in-electric-vehicles/", "body": "Major automaker announcements have included: Ford - $50 billion announced, EV manufacturing in Kentucky, Michigan, Missouri, Ohio, and Tennessee, and Cologne, Germany. General Motors - $35 billion globally by 2030, EV manufacturing in Indiana, Michigan, Ohio, and Tennessee, Canada, and Mexico."}]
|
outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-7102211584855250932.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[{"title": "Car Market Outlook: What To Expect In 2023", "href": "https://www.forbes.com/wheels/features/car-market-outlook-2023/", "body": "Of all the electric (and non-electric) vehicles on the market in 2023, only the Chevrolet Bolt and Bolt EUV had drastic price cuts. Now $6,000 cheaper, both are some of the first genuinely..."}, {"title": "Electric vehicle production set to surge in 2023 despite low sales", "href": "https://www.reuters.com/business/autos-transportation/electric-vehicles-confront-leap-mass-market-2022-12-15/", "body": "Electric vehicle production set to surge in 2023 despite low sales By Joseph White December 15, 20224:02 PM PSTUpdated 8 months ago DETROIT, Dec 15 (Reuters) - The past year was sobering for..."}, {"title": "Four 2023 Electric Vehicle Trends to Watch - Bloomberg", "href": "https://www.bloomberg.com/news/articles/2022-12-31/four-2023-electric-vehicle-trends-to-watch", "body": "The $100,000+ market isn't slowing down. Plenty of swankier SUVs are in the offing in 2023, including a version of GMC's Hummer EV, with a price tag squarely in six-figure territory; the first ..."}]
|
outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-8699972586918080875.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
[{"title": "Electric vehicle trends | Deloitte Insights", "href": "https://www2.deloitte.com/us/en/insights/focus/future-of-mobility/electric-vehicle-trends-2030.html", "body": "Since Deloitte last presented a forecast for electric vehicle (EV) sales, in January 2019, the EV market has made great strides, and not just in terms of sales. OEMs have invested billions to deliver new electrified models, from R&D to factory redesign. Consumer attitudes have evolved. Government interventions have pushed forward and pulled back."}, {"title": "Electric Vehicle (EV) Trends In 2023 - GreenLancer", "href": "https://www.greenlancer.com/post/ev-market-trends", "body": "The Chevy Silverado EV is set to launch with a price tag of over $100,000. The 2023 Nissan Ariya crossover SUV boasts a range of up to 304 miles. The sleek BMW i5 will have a driving range of 372 miles and a starting cost between $65,000 and $70,000. The futuristic and stylish Hyundai Ioniq 6, with a starting price of $44,000 and a range of 320 ..."}, {"title": "Driving into 2025: The Future of Electric Vehicles | J.P. Morgan", "href": "https://www.jpmorgan.com/insights/research/electric-vehicles", "body": "By 2025, J.P. Morgan estimates this will rise close to 8.4 million vehicles or a 7.7% market share. While this jump is significant, it doesn't compare to the kind of growth expected in HEVs - cars that combine a fuel engine with electric elements. This sector is forecast to swell from just 3% of global market share to more than 25 million ..."}]
|
statics/__pycache__/style.cpython-311.pyc
CHANGED
Binary files a/statics/__pycache__/style.cpython-311.pyc and b/statics/__pycache__/style.cpython-311.pyc differ
|
|
statics/style.py
CHANGED
@@ -33,7 +33,7 @@ css = """
|
|
33 |
|
34 |
.output {
|
35 |
padding: 10px;
|
36 |
-
min-height:
|
37 |
border: 1.5px solid #9A73B5;
|
38 |
border-radius: 10px;
|
39 |
margin-bottom: 10px;
|
@@ -83,7 +83,7 @@ top_bar = """
|
|
83 |
<body>
|
84 |
"""
|
85 |
|
86 |
-
|
87 |
<span data-testid="block-info" class="svelte-1gfkn6j custom_label")># Report</span>
|
88 |
"""
|
89 |
|
|
|
33 |
|
34 |
.output {
|
35 |
padding: 10px;
|
36 |
+
min-height: 300px;
|
37 |
border: 1.5px solid #9A73B5;
|
38 |
border-radius: 10px;
|
39 |
margin-bottom: 10px;
|
|
|
83 |
<body>
|
84 |
"""
|
85 |
|
86 |
+
report_html = """
|
87 |
<span data-testid="block-info" class="svelte-1gfkn6j custom_label")># Report</span>
|
88 |
"""
|
89 |
|