zej97 commited on
Commit
7317b00
1 Parent(s): d5d0a9d

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -15,9 +15,9 @@ sdk_version: 3.38.0
15
  Inspired by [gpt-researcher](https://github.com/assafelovic/gpt-researcher). This project endeavors to develop an AI research assistant capable of **generating research reports** effortlessly for researchers. For instance, researchers can request the AI research assistant to compose a report on *the latest advancements in the field of superconductors as of 2023*, which is currently a trending topic. The AI research assistant will subsequently compile a report based on the relevant information obtained from the internet. Now, AIRA also offers support for **academic English polishing**.
16
 
17
  <!-- make a table -->
18
- | Image1 | Image2 |
19
- | :----: | :----: |
20
- | <img src="./statics/example1-1.png"> | <img src="./statics/example1-2.png"> |
21
 
22
  The currently supported agents encompass a wide range of fields, including *finance, business analysis, clinical medicine, basic medicine, travel, academic research and sociology*.
23
 
@@ -68,6 +68,9 @@ or you can set the api key and base in `.env` file.
68
  - [ ] Prettify report
69
  - [x] Add medical agent and social agent
70
  - [ ] Add option for users to customize the number of words and temperature
 
 
 
71
 
72
  ---
73
 
 
15
  Inspired by [gpt-researcher](https://github.com/assafelovic/gpt-researcher). This project endeavors to develop an AI research assistant capable of **generating research reports** effortlessly for researchers. For instance, researchers can request the AI research assistant to compose a report on *the latest advancements in the field of superconductors as of 2023*, which is currently a trending topic. The AI research assistant will subsequently compile a report based on the relevant information obtained from the internet. Now, AIRA also offers support for **academic English polishing**.
16
 
17
  <!-- make a table -->
18
+ | Example1-1 | Example1-2 | Example1-3 |
19
+ | :----------------------------------: | :----------------------------------: | :----------------------------------: |
20
+ | <img src="./statics/example1-1.png"> | <img src="./statics/example1-2.png"> | <img src="./statics/example1-3.png"> |
21
 
22
  The currently supported agents encompass a wide range of fields, including *finance, business analysis, clinical medicine, basic medicine, travel, academic research and sociology*.
23
 
 
68
  - [ ] Prettify report
69
  - [x] Add medical agent and social agent
70
  - [ ] Add option for users to customize the number of words and temperature
71
+ - [ ] Copy and download buttons
72
+ - [ ] Allows the user to choose the degree of research.
73
+ - [ ] Wikipedia Understanding
74
 
75
  ---
76
 
__pycache__/app.cpython-39.pyc CHANGED
Binary files a/__pycache__/app.cpython-39.pyc and b/__pycache__/app.cpython-39.pyc differ
 
agent/__pycache__/prompts.cpython-311.pyc CHANGED
Binary files a/agent/__pycache__/prompts.cpython-311.pyc and b/agent/__pycache__/prompts.cpython-311.pyc differ
 
agent/prompts.py CHANGED
@@ -38,6 +38,7 @@ def generate_report_prompt(question, research_summary):
38
  " in depth, with facts and numbers if available, a minimum of 2,400 words and with markdown syntax and apa format. "\
39
  "Write all source urls at the end of the report in apa format."
40
 
 
41
  def generate_search_queries_prompt(question):
42
  """ Generates the search queries prompt for the given question.
43
  Args: question (str): The question to generate the search queries prompt for
@@ -80,6 +81,7 @@ def generate_outline_report_prompt(question, research_summary):
80
  ' The research report should be detailed, informative, in-depth, and a minimum of 1,200 words.' \
81
  ' Use appropriate Markdown syntax to format the outline and ensure readability.'
82
 
 
83
  def generate_concepts_prompt(question, research_summary):
84
  """ Generates the concepts prompt for the given question.
85
  Args: question (str): The question to generate the concepts prompt for
@@ -107,6 +109,7 @@ def generate_lesson_prompt(concept):
107
 
108
  return prompt
109
 
 
110
  def get_report_by_type(report_type):
111
  report_type_mapping = {
112
  'Research Report': generate_report_prompt,
@@ -115,6 +118,7 @@ def get_report_by_type(report_type):
115
  }
116
  return report_type_mapping[report_type]
117
 
 
118
  def generate_english_polishing_prompt(content):
119
  """ Generates the english polishing prompt for the given content.
120
  Inspired by project gpt_academic
@@ -123,6 +127,7 @@ def generate_english_polishing_prompt(content):
123
  """
124
  return f'Below is a paragraph from an academic paper. Polish the writing to meet the academic style and improve the spelling, grammar, clarity, concision, and overall readability. When necessary, rewrite the whole sentence. Furthermore, list all modifications and explain the reasons for doing so in the markdown table. \n {content}'
125
 
 
126
  def generate_summarize_prompt(content):
127
  """ Generates the summarize prompt for the given content.
128
  Inspired by project gpt_academic
 
38
  " in depth, with facts and numbers if available, a minimum of 2,400 words and with markdown syntax and apa format. "\
39
  "Write all source urls at the end of the report in apa format."
40
 
41
+
42
  def generate_search_queries_prompt(question):
43
  """ Generates the search queries prompt for the given question.
44
  Args: question (str): The question to generate the search queries prompt for
 
81
  ' The research report should be detailed, informative, in-depth, and a minimum of 1,200 words.' \
82
  ' Use appropriate Markdown syntax to format the outline and ensure readability.'
83
 
84
+
85
  def generate_concepts_prompt(question, research_summary):
86
  """ Generates the concepts prompt for the given question.
87
  Args: question (str): The question to generate the concepts prompt for
 
109
 
110
  return prompt
111
 
112
+
113
  def get_report_by_type(report_type):
114
  report_type_mapping = {
115
  'Research Report': generate_report_prompt,
 
118
  }
119
  return report_type_mapping[report_type]
120
 
121
+
122
  def generate_english_polishing_prompt(content):
123
  """ Generates the english polishing prompt for the given content.
124
  Inspired by project gpt_academic
 
127
  """
128
  return f'Below is a paragraph from an academic paper. Polish the writing to meet the academic style and improve the spelling, grammar, clarity, concision, and overall readability. When necessary, rewrite the whole sentence. Furthermore, list all modifications and explain the reasons for doing so in the markdown table. \n {content}'
129
 
130
+
131
  def generate_summarize_prompt(content):
132
  """ Generates the summarize prompt for the given content.
133
  Inspired by project gpt_academic
config/__pycache__/config.cpython-39.pyc CHANGED
Binary files a/config/__pycache__/config.cpython-39.pyc and b/config/__pycache__/config.cpython-39.pyc differ
 
outputs/Is Apple stock stable/research--1807787156852143573.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Apple Inc. (AAPL) Stock Historical Prices & Data - Yahoo Finance", "href": "https://finance.yahoo.com/quote/AAPL/history", "body": "Discover historical prices for AAPL stock on Yahoo Finance. View daily, weekly or monthly format back to when Apple Inc. stock was issued."}, {"title": "Apple - 43 Year Stock Price History | AAPL | MacroTrends", "href": "https://www.macrotrends.net/stocks/charts/AAPL/apple/stock-price-history", "body": "Market Cap. Historical daily share price chart and data for Apple since 1980 adjusted for splits and dividends. The latest closing stock price for Apple as of August 02, 2023 is 192.58. The all-time high Apple stock closing price was 196.45 on July 31, 2023. The Apple 52-week high stock price is 198.23, which is 2.9% above the current share price."}, {"title": "Apple (AAPL) Historical Data | Nasdaq", "href": "https://www.nasdaq.com/market-activity/stocks/aapl/historical", "body": "Back to AAPL Overview. Get up to 10 years of daily historical stock prices & volumes. The \"Close/Last\" is the \"adjust consolidated close price\". Data provided by Edgar Online . The net and ..."}]
outputs/Is Apple stock stable/research--5414072335408872885.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Is Apple Stock a Buy Now? | The Motley Fool", "href": "https://www.fool.com/investing/2023/06/29/is-apple-stock-a-buy-now/", "body": "Key Points. Apple shares have soared over 40% this year. Apple's history of reliability has led Wall Street to see its stock as a haven during uncertain market conditions. Apple continues to grow ..."}, {"title": "Apple Inc. : Analyst Recommendations and Opinions - MarketScreener.com", "href": "https://www.marketscreener.com/quote/stock/APPLE-INC-4849/news-broker-research/", "body": "Piper Sandler Adjusts Price Target on Apple to $220 From $180, Maintains Overweight Rating. Jul. 31. MT. Bernstein Adjusts Apple's Price Target to $195 From $175, Keeps Market Perform Rating. Jul. 27. MT. Deutsche Bank Adjusts Apple Price Target to $210 From $180, Maintains Buy Rating. Jul. 24."}, {"title": "Apple Outlook: What Analysts Are Saying About AAPL Stock Now", "href": "https://investorplace.com/2023/03/apple-outlook-what-analysts-are-saying-about-aapl-stock-now/", "body": "Some Wall Street experts are enthusiastic about AAPL stock, but the reviews are mixed and investors must consider Apple's pros and cons. ... of expert opinions on Apple, and perhaps arrive at an ..."}]
outputs/Is Apple stock stable/research--5887948791887317687.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "What Moves Apple's Stock Price? - Investopedia", "href": "https://www.investopedia.com/stock-analysis/061115/what-moves-apples-stock-price-aapl.aspx", "body": "In the meantime, Apple stock prices will likely be driven by the following five factors: iPhone Sales iPhone sales are the largest revenue generator for the company. For 2019, sales of the..."}, {"title": "Apple Stock Predictions: 2023 To 2025 - Forbes", "href": "https://www.forbes.com/sites/qai/2022/12/28/apple-stock-predictions-2023-to-2025/", "body": "There are still many macroeconomic factors impacting major companies and the tech industry. With that said, rumors are swirling that Apple will release a new product category in 2023 in the..."}, {"title": "Investing In Apple: The Risks and Rewards - Investopedia", "href": "https://www.investopedia.com/stock-analysis/021815/investing-apple-risks-rewards-aapl.aspx", "body": "A slowdown in any of the following could materially reduce Apple's multiple and stock price: overall smartphone market growth, iPhone market share growth, or penetration into China."}]
outputs/Is Apple stock stable/research--8009323857187544909.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Apple Stock Predictions: 2023 To 2025 - Forbes", "href": "https://www.forbes.com/sites/qai/2022/12/28/apple-stock-predictions-2023-to-2025/", "body": "Analysts predict that the company's stock should go up in 2023. Strong iPhone and Mac computer sales led to Apple reporting a record quarterly revenue of $90.1 billion during a time when many..."}, {"title": "Apple Analyst Expects Stock To Hit $210 On 2024 Earnings Projections ...", "href": "https://markets.businessinsider.com/news/stocks/apple-analyst-expects-stock-to-hit-210-on-2024-earnings-projections-iphone-delay-1032459668?op=1", "body": "AAPL Price Action: Shares of Apple had declined by 0.36% to $193.03 41.10 at the time of publishing Wednesday. See Also: Apple Settles Into 2 Bullish Patterns Mid-Week: The Bull, Bear Case For The ..."}, {"title": "Where Will Apple Stock Be in 2030? | The Motley Fool", "href": "https://www.fool.com/investing/2022/09/13/where-will-apple-stock-be-in-2030/", "body": "In fiscal 2021, Apple generated $366 billion in annual sales. $297 billion, or 81%, came from its products segment, which includes the iPhone, iPad, and Mac. The other $68 billion, or 19%, came..."}]
outputs/Is Apple stock stable/research-1198675951194370776.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Apple Competitors and Alternatives 2023 (NASDAQ:AAPL) - MarketBeat", "href": "https://www.marketbeat.com/stocks/NASDAQ/AAPL/competitors-and-alternatives/", "body": "Should you be buying Apple stock or one of its competitors? The main competitors of Apple include Microsoft (MSFT), Alphabet (GOOG), Alphabet (GOOGL), NVIDIA (NVDA), Meta Platforms (META), Dell Technologies (DELL), Super Micro Computer (SMCI), One Stop Systems (OSS), Socket Mobile (SCKT), and Taiwan Semiconductor Manufacturing (TSM)."}, {"title": "Apple Inc. (AAPL) Key Stats Comparison | Seeking Alpha", "href": "https://seekingalpha.com/symbol/AAPL/peers/comparison", "body": "Apple Inc. (AAPL) key stats comparison: compare with other stocks by metrics: valuation, growth, profitability, momentum, EPS revisions, dividends, ratings."}, {"title": "AAPL - Apple Stock Competitors - Barchart.com", "href": "https://www.barchart.com/stocks/quotes/AAPL/competitors", "body": "About Weighted Alpha. Weighted Alpha is a measure of how much a stock has risen or fallen over a one-year period. The original research was restricted to large cap stocks, so the corresponding rise in the S&P 500 index was subtracted; however, as there are a number of interesting stocks that do not fit well into any category, and others that ..."}]
outputs/Why is feature engineering important in financial forecasting/research--7260079429866833403.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Survey of feature selection and extraction techniques for stock market ...", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "In stock market forecasting, the identification of critical features that affect the performance of machine learning (ML) models is crucial to achieve accurate stock price predictions. Several review papers in the literature have focused on various ML, statistical, and deep learning-based methods used in stock market forecasting. However, no survey study has explored feature selection and ..."}, {"title": "Feature Engineering for Predictive Modeling: A Guide - LinkedIn", "href": "https://www.linkedin.com/advice/3/how-do-you-use-feature-engineering-improve", "body": "Encoding, scaling, binning, aggregation, and transformation are some common techniques for creating features. For example, one-hot encoding or label encoding can be used to encode categorical..."}, {"title": "Financial Forecasting: How to Do It with Different Methods, Models ...", "href": "https://blog.hubspot.com/sales/financial-forecasting", "body": "1. What is financial forecasting? Forecasting vs. Budgeting 2. Financial Forecasting Models Top-Down Financial Forecasting Delphi Financial Forecasting Statistical Forecasting Bottom-Up Financial Forecasting 3. Financial Forecasting Methods Straight Line Simple Linear Regression Multiple Linear Regression Moving Average 4."}]
outputs/Why is feature engineering important in financial forecasting/research--7937428013352407195.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "A Step-by-Step Guide to Feature Engineering for Multivariate Time ...", "href": "https://towardsdatascience.com/a-step-by-step-guide-to-feature-engineering-for-multivariate-time-series-162ccf232e2f", "body": "Automated Feature Engineering. Feature engineering involves extracting and curating explanatory variables. It is a key stage in any data science project. The quality of the features is a central aspect of the performance of models. Because of this, data scientists spend a lot of time in this process. Yet, feature engineering is often an ad-hoc ..."}, {"title": "FP&A Tips: How to Improve Forecasting Accuracy in 2023? - Abacum", "href": "https://www.abacum.io/blog/6-ways-to-improve-forecast-accuracy", "body": "According to FP&A trends, \"The forecast is accurate if the actuals tend to match the forecast within \"small\" variances.\" Another definition they highlighted states, \"The forecast is accurate when all the assumptions and decisions are sound, correctly captured, sized and timed to.\""}, {"title": "A Comparative Study of Demand Forecasting Models for a Multi-Channel ...", "href": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9514716/", "body": "A hybrid genetic algorithm-based XGBoost forecasting methodology is developed. This study empirically demonstrates the significance of feature engineering in forecasting the prices of stocks: Wang et al. To overcome the challenges of predicting rental bike demand on an hourly basis, a data mining technique is used."}]
outputs/Why is feature engineering important in financial forecasting/research--8497491436117821687.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Feature Engineering for Predictive Modeling: A Guide - LinkedIn", "href": "https://www.linkedin.com/advice/3/how-do-you-use-feature-engineering-improve", "body": "Learn more \u2014 The LinkedIn Team Last updated on Apr 27, 2023 Feature engineering is a crucial step in predictive modeling, where you transform raw data into meaningful and useful features for..."}, {"title": "Survey of feature selection and extraction ... - Financial Innovation", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "Different types of technical in- dicators, such as stochastic oscillator, moving averages, and relative strength index (RSI), are used in prediction models, and the effectiveness of these input features for future stock market forecasting is studied."}, {"title": "Discrete Wavelet Transform-based feature engineering for ... - Springer", "href": "https://link.springer.com/article/10.1007/s41870-023-01157-2", "body": "CSO is used for the feature selection and to get the optimal feature set. As per the authors' best knowledge none of the existing studies had used CSO for feature selection in financial TS analysis. The proposed feature engineering component is named as DWT-CSO. For stock market trend prediction, ML and DL models are used."}]
outputs/Why is feature engineering important in financial forecasting/research--8811703707667059559.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Survey of feature selection and extraction ... - Financial Innovation", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "In stock market forecasting, the identification of critical features that affect the performance of machine learning (ML) models is crucial to achieve accurate stock price predictions. Several review papers in the literature have focused on various ML, statistical, and deep learning-based methods used in stock market forecasting."}, {"title": "(PDF) Feature Selection for Forecasting - ResearchGate", "href": "https://www.researchgate.net/publication/369035848_Feature_Selection_for_Forecasting", "body": "This work investigates the importance of feature selection for improving the forecasting performance of machine learning algorithms for financial data. Artificial neural networks (ANN ..."}, {"title": "Stock index trend prediction based on TabNet feature selection ... - PLOS", "href": "https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0269195", "body": "Fig 4 shows feature importance masks mask[i] that indicates feature ... Cui L. Deep learning-based feature engineering for stock price movement prediction. Knowledge-Based Systems. 2019; 164: 163-173. ... Ming LJ, Sumei R, Shuping Z. A hybrid model for financial time series forecasting\u2014integration of EWT, ARIMA with the improved ABC ..."}]
outputs/Why is feature engineering important in financial forecasting/research-6645279715195215869.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"title": "Feature Engineering: Processes, Techniques & Benefits in 2023", "href": "https://research.aimultiple.com/feature-engineering/", "body": "In this article, we'll explore what feature engineering is, what are its techniques, and how you can improve feature engineering efficiency. ... Features that are relevant to the problem and appropriate for the model would increase model accuracy. Irrelevant features, on the other hand, would result in \"Garbage in-Garbage out\" situation ..."}, {"title": "Feature Engineering | Snowflake", "href": "https://www.snowflake.com/guides/feature-engineering", "body": "Regardless of how much algorithms continue to improve, feature engineering continues to be a difficult process that requires human intelligence with domain expertise. In the end, the quality of feature engineering often drives the quality of a machine learning model. ... Financial Services. Healthcare & Life Sciences. Manufacturing. Public ..."}, {"title": "What Is Feature Engineering and why should it be automated?", "href": "https://www.explorium.ai/blog/what-is-feature-engineering/", "body": "What is feature engineering, and why should you automate it? In this blog post, we answer these questions and more. Platform. External Data Platform; Integrations; API. Overview; ... working out which features are most relevant to your dataset and which have the biggest impact on the accuracy of your model. It will then present around 50-100 ..."}]
statics/README_zh.md CHANGED
@@ -38,13 +38,4 @@ $ export OPENAI_API_BASE = your_api_base
38
 
39
  ```shell
40
  $ python app.py
41
- ```
42
-
43
- ## 待办事项
44
-
45
- - [x] 将Google搜索切换到DuckDuckGo
46
- - [ ] 文献综述
47
- - [x] 第三方API
48
- - [ ] 优化报告
49
- - [x] 添加医疗代理和社交代理
50
- - [ ] 为用户添加自定义单词数和温度的选项
 
38
 
39
  ```shell
40
  $ python app.py
41
+ ```
 
 
 
 
 
 
 
 
 
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/example1-1.png CHANGED
statics/example1-2.png CHANGED
statics/example1-3.png ADDED
statics/style.py CHANGED
@@ -2,7 +2,6 @@ css = """
2
  .top-bar {
3
  padding-bottom: 10px;
4
  background-color: transparent;
5
- border-bottom: #E9E4ED 1px solid;
6
  }
7
 
8
  .top-bar .in-bar-title {
@@ -34,19 +33,21 @@ css = """
34
  .output {
35
  padding: 10px;
36
  min-height: 300px;
37
- border: 1.5px solid #9A73B5;
38
  border-radius: 10px;
39
  margin-bottom: 10px;
 
 
40
  }
41
 
42
  #history {
43
  padding: 10px !important;
44
- border: 1.5px dashed #9A73B5 !important;
45
  border-radius: 10px !important;
46
  }
47
 
48
  #primary-btn {
49
- border: 1.5px solid #9A73B5;
50
  font-size: 20px;
51
  }
52
 
@@ -59,8 +60,24 @@ css = """
59
  border-bottom: 1.5px dashed #9A73B5;
60
  padding: 10px;
61
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  """
63
 
 
 
64
  top_bar = """
65
  <head>
66
  <link rel="preconnect" href="https://fonts.googleapis.com">
 
2
  .top-bar {
3
  padding-bottom: 10px;
4
  background-color: transparent;
 
5
  }
6
 
7
  .top-bar .in-bar-title {
 
33
  .output {
34
  padding: 10px;
35
  min-height: 300px;
36
+ border: 1.5px solid #AC7DD280;
37
  border-radius: 10px;
38
  margin-bottom: 10px;
39
+ transition: opacity .1s ease-in-out;
40
+ background: var(--block-background-fill);
41
  }
42
 
43
  #history {
44
  padding: 10px !important;
45
+ border: 1.5px dashed #AC7DD2 !important;
46
  border-radius: 10px !important;
47
  }
48
 
49
  #primary-btn {
50
+ border: 1.5px solid #AC7DD2;
51
  font-size: 20px;
52
  }
53
 
 
60
  border-bottom: 1.5px dashed #9A73B5;
61
  padding: 10px;
62
  }
63
+
64
+ .tab-nav {
65
+ border-bottom: 1.5px solid #9A73B5 !important;
66
+ }
67
+
68
+ .selected {
69
+ border: 1.5px solid #9A73B5 !important;
70
+ border-bottom: none !important;
71
+ }
72
+
73
+ .tabitem {
74
+ border: 1.5px solid #9A73B5 !important;
75
+ border-top: none !important;
76
+ }
77
  """
78
 
79
+ # #809A73B5
80
+
81
  top_bar = """
82
  <head>
83
  <link rel="preconnect" href="https://fonts.googleapis.com">