buzzCraft commited on
Commit
e46e844
1 Parent(s): 68f18b5

Updated readme

Browse files
README.md CHANGED
@@ -6,13 +6,28 @@ pip install -r requirements.txt
6
  ````
7
  Rename .env_demo to .env and fill in the required fields.
8
 
9
- ## Required data
 
 
10
  The data required to run the code is not included in this repository.
11
  The data can be downloaded from the [Soccernet](https://www.soccer-net.org/data).
12
  Files needed are:
13
- * Labels-v2.json
14
  * Labels-captions.json
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## Running the code
17
  To run the code, execute the following command:
18
  ````bash
@@ -20,6 +35,14 @@ python main.py
20
  ````
21
  The code will prompt you to enter a natural language query.
22
 
 
 
 
 
 
 
 
 
23
  ## Results
24
  ..
25
 
 
6
  ````
7
  Rename .env_demo to .env and fill in the required fields.
8
 
9
+ ## Setting up the database
10
+
11
+ ### Required data
12
  The data required to run the code is not included in this repository.
13
  The data can be downloaded from the [Soccernet](https://www.soccer-net.org/data).
14
  Files needed are:
15
+ * Labels-v2.json [link](https://www.soccer-net.org/data#h.5klq86rmgt96)
16
  * Labels-captions.json
17
 
18
+ The data should be placed in the ./data/Dataset/SoccerNet/ directory
19
+ For each league, create a new folder with the name of the leauge
20
+ For each season create a new folder with the name of the season (YYYY-YYYY)
21
+ For each game create a new folder with the name of the game (YYYY-MM-DD - HomeTeam Score - Score AwayTeam)
22
+ In each game folder, place the Labels-v2.json and Labels-captions.json files
23
+
24
+ ### Setting up and populating the database
25
+ To set up the database, execute the following command:
26
+ ````bash
27
+ python src/database.py
28
+ ````
29
+ Adjust the path to the data in the database.py file as needed.
30
+
31
  ## Running the code
32
  To run the code, execute the following command:
33
  ````bash
 
35
  ````
36
  The code will prompt you to enter a natural language query.
37
 
38
+ ````angular2html
39
+ Enter a query: How many goals has Messi scored each season?
40
+ Lionel Messi has scored the following number of goals each season:
41
+ - 2014-2015: 13 goals
42
+ - 2015-2016: 3 goals
43
+ - 2016-2017: 31 goals
44
+ ````
45
+
46
  ## Results
47
  ..
48
 
requirements.txt CHANGED
@@ -1,11 +1,13 @@
1
- openai
2
- langchainhub
3
  langchain == 0.1.4
4
- langchain_openai
5
- langchain_experimental
6
- sqlalchemy
7
- python-dotenv
8
- chromadb
9
- python-Levenshtein
10
- rapidfuzz
11
- thefuzz
 
 
 
1
+ openai==1.10.0
2
+ langchainhub==0.1.14
3
  langchain == 0.1.4
4
+ langchain-experimental==0.0.49
5
+ langchain-openai==0.0.5
6
+ SQLAlchemy==2.0.29
7
+ python-dotenv==1.0.1
8
+ python-Levenshtein==0.25.0
9
+ rapidfuzz==3.6.1
10
+ thefuzz==0.22.1
11
+ faiss-cpu==1.7.4
12
+ Levenshtein==0.25.0
13
+ langsmith==0.1.29
src/{database/database.py → database.py} RENAMED
@@ -438,8 +438,8 @@ def fill_Augmented_League(file_path):
438
 
439
  if __name__ == "__main__":
440
  # Example directory path
441
- process_json_files('../../data/Dataset/SN-ASR_captions_and_actions/')
442
- fill_Augmented_Team('../../data/Dataset/augmented.csv')
443
- fill_Augmented_League('../../data/Dataset/augmented_leauges.csv')
444
  # Rename the event/annotation table to something more descriptive. Events are fucking everything else over
445
 
 
438
 
439
  if __name__ == "__main__":
440
  # Example directory path
441
+ process_json_files('../data/Dataset/SoccerNet/')
442
+ fill_Augmented_Team('../data/Dataset/augmented.csv')
443
+ fill_Augmented_League('../data/Dataset/augmented_leauges.csv')
444
  # Rename the event/annotation table to something more descriptive. Events are fucking everything else over
445
 
src/database/readdata.ipynb DELETED
The diff for this file is too large to render. See raw diff