sidphbot commited on
Commit
8387173
1 Parent(s): 24b56ee

spaces init

Browse files
Files changed (2) hide show
  1. README.md +34 -18
  2. app.py +7 -13
README.md CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Auto-Research
2
  ![Auto-Research][logo]
3
 
@@ -22,32 +34,23 @@ Kaggle Re-usable Demo : https://www.kaggle.com/sidharthpal/auto-research-generat
22
  (`[TIP]` click 'edit and run' to run the demo for your custom queries on a free GPU)
23
 
24
 
25
- #### Steps to run (pip coming soon):
 
 
 
26
  ```
27
- apt install -y poppler-utils libpoppler-cpp-dev
28
- git clone https://github.com/sidphbot/Auto-Research.git
29
 
30
- cd Auto-Research/
31
- pip install -r requirements.txt
32
  python survey.py [options] <your_research_query>
33
  ```
34
 
35
- #### Artifacts generated (zipped):
36
- - Detailed survey draft paper as txt file
37
- - A curated list of top 25+ papers as pdfs and txts
38
- - Images extracted from above papers as jpegs, bmps etc
39
- - Heading/Section wise highlights extracted from above papers as a re-usable pure python joblib dump
40
- - Tables extracted from papers(optional)
41
- - Corpus of metadata highlights/text of top 100 papers as a re-usable pure python joblib dump
42
-
43
- ## Example run #1 - python utility
44
-
45
  ```
46
- python survey.py 'multi-task representation learning'
47
  ```
48
 
49
- ## Example run #2 - python class
50
-
51
  ```
52
  from survey import Surveyor
53
  mysurveyor = Surveyor()
@@ -264,4 +267,17 @@ optional arguments:
264
  > during survey generation with `surveyor_obj.survey(query="my_research_query")`
265
  - `max_search`: int maximium number of papers to gaze at - defaults to `100`
266
  - `num_papers`: int maximium number of papers to download and analyse - defaults to `25`
 
 
 
 
 
 
 
 
 
 
 
 
 
267
 
 
1
+ ----
2
+ -title: Surveyor
3
+ -emoji: 📊
4
+ -colorFrom: gray
5
+ -colorTo: pink
6
+ -sdk: streamlit
7
+ -sdk_version: 1.9.0
8
+ -app_file: app.py
9
+ -pinned: false
10
+ -license: apache-2.0
11
+ ----
12
+
13
  # Auto-Research
14
  ![Auto-Research][logo]
15
 
 
34
  (`[TIP]` click 'edit and run' to run the demo for your custom queries on a free GPU)
35
 
36
 
37
+ #### Installation:
38
+ ```
39
+ sudo apt-get install build-essential poppler-utils libpoppler-cpp-dev pkg-config python-dev
40
+ pip install git+https://github.com/sidphbot/Auto-Research.git
41
  ```
 
 
42
 
43
+ #### Run Survey (cli):
44
+ ```
45
  python survey.py [options] <your_research_query>
46
  ```
47
 
48
+ #### Run Survey (Streamlit web-interface - new):
 
 
 
 
 
 
 
 
 
49
  ```
50
+ streamlit run app.py
51
  ```
52
 
53
+ #### Run Survey (Python API):
 
54
  ```
55
  from survey import Surveyor
56
  mysurveyor = Surveyor()
 
267
  > during survey generation with `surveyor_obj.survey(query="my_research_query")`
268
  - `max_search`: int maximium number of papers to gaze at - defaults to `100`
269
  - `num_papers`: int maximium number of papers to download and analyse - defaults to `25`
270
+
271
+
272
+
273
+ #### Artifacts generated (zipped):
274
+ - Detailed survey draft paper as txt file
275
+ - A curated list of top 25+ papers as pdfs and txts
276
+ - Images extracted from above papers as jpegs, bmps etc
277
+ - Heading/Section wise highlights extracted from above papers as a re-usable pure python joblib dump
278
+ - Tables extracted from papers(optional)
279
+ - Corpus of metadata highlights/text of top 100 papers as a re-usable pure python joblib dump
280
+
281
+
282
+ Please cite this repo if it helped you :)
283
 
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import numpy as np
4
 
5
- #from src.Surveyor import Surveyor
6
 
7
  def run_survey(surveyor, research_keywords, max_search, num_papers):
8
  zip_file_name, survey_file_name = surveyor.survey(research_keywords,
@@ -21,16 +21,10 @@ def run_survey(surveyor, research_keywords, max_search, num_papers):
21
  btn = st.download_button(
22
  label="Download detailed generated survey file",
23
  data=file,
24
- file_name=str(zip_file_name)
25
- )
26
-
27
- with open(str(survey_file_name), "rb") as file:
28
- btn = st.download_button(
29
- label="Download detailed generated survey file",
30
- data=file,
31
- file_name=str(zip_file_name)
32
  )
33
- st.write(file.readlines())
 
34
 
35
 
36
  def survey_space():
@@ -47,9 +41,9 @@ def survey_space():
47
 
48
  if submit:
49
  st.write("hello")
50
- #if surveyor_obj is None:
51
- # surveyor_obj = Surveyor()
52
- #run_survey(surveyor_obj, research_keywords, max_search, num_papers)
53
 
54
 
55
  if __name__ == '__main__':
 
2
  import pandas as pd
3
  import numpy as np
4
 
5
+ from src.Surveyor import Surveyor
6
 
7
  def run_survey(surveyor, research_keywords, max_search, num_papers):
8
  zip_file_name, survey_file_name = surveyor.survey(research_keywords,
 
21
  btn = st.download_button(
22
  label="Download detailed generated survey file",
23
  data=file,
24
+ file_name=str(survey_file_name)
 
 
 
 
 
 
 
25
  )
26
+ for line in file.readlines():
27
+ st.write(line)
28
 
29
 
30
  def survey_space():
 
41
 
42
  if submit:
43
  st.write("hello")
44
+ if surveyor_obj is None:
45
+ surveyor_obj = Surveyor()
46
+ run_survey(surveyor_obj, research_keywords, max_search, num_papers)
47
 
48
 
49
  if __name__ == '__main__':