You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MovieVerse-Middleware/machine-learning/README.md
+43-1
Original file line number
Diff line number
Diff line change
@@ -21,29 +21,71 @@ The `Machine-Learning` directory contains Python scripts that leverage machine l
21
21
22
22
This script uses machine learning models to classify movies into genres based on their descriptions, titles, and other metadata. It helps in categorizing movies accurately within the app database.
23
23
24
+
To run the genre classifier, execute the following command:
25
+
26
+
```bash
27
+
python genre-classifier.py
28
+
```
29
+
24
30
### Movie Recommendation (`movie-recommendation.py`)
25
31
26
32
This script is responsible for generating movie recommendations for users based on their viewing history, preferences, and ratings. It uses collaborative filtering and content-based methods to provide personalized recommendations.
27
33
34
+
To run, execute the following command:
35
+
36
+
```bash
37
+
python movie-recommendation.py
38
+
```
39
+
28
40
### Movie Reviews Analysis (`movie-reviews.py`)
29
41
30
42
This script processes and analyzes movie reviews, extracting insights and useful information. It might use natural language processing (NLP) techniques to understand user sentiments, key themes, and overall opinions about movies.
31
43
44
+
To get started, you can run the following command:
45
+
46
+
```bash
47
+
python movie-reviews.py
48
+
```
49
+
50
+
Then, follow the instructions provided by the script to analyze movie reviews and extract valuable information.
51
+
32
52
### Plot Summarizer (`plot-summarizer.py`)
33
53
34
54
`plot-summarizer.py` utilizes NLP and text summarization algorithms to create concise summaries of movie plots. This assists users in quickly grasping the essence of a movie without spoilers.
35
55
56
+
To get started, you can run the following command:
57
+
58
+
```bash
59
+
python plot-summarizer.py
60
+
```
61
+
62
+
Then, follow the instructions by Streamlit to view the plot summarizer web application. For example, you may receive the following instructions:
63
+
64
+
```
65
+
Warning: to view this Streamlit app on a browser, run it with the following command:
66
+
67
+
streamlit run /Users/davidnguyen/WebstormProjects/The-MovieVerse-Database/MovieVerse-Backend/machine-learning/plot-summarizer.py [ARGUMENTS]
68
+
```
69
+
70
+
In this case, simply copy and run the provided `streamlit run` command in your terminal to view the plot summarizer web application.
71
+
36
72
### Sentiment Analysis (`sentiment_analysis.py`)
37
73
38
74
This script performs sentiment analysis on user reviews and comments. It determines the overall sentiment (positive, negative, neutral) expressed in the text, helping in gauging audience reception of movies.
39
75
76
+
To run, simply execute the following command:
77
+
78
+
```bash
79
+
python sentiment_analysis.py
80
+
```
81
+
40
82
## Using these Scripts
41
83
42
84
To run these scripts:
43
85
44
86
1. Ensure you have Python installed on your system.
45
87
2. Install necessary libraries using pip: `pip install -r requirements.txt` (assuming a `requirements.txt` file is present).
46
-
3. Execute each script as needed, e.g., `python genre-classifier.py`.
88
+
3. Execute each script as needed, following the instructions above.
st.write("This is a simple movie plot summarizer built using the HuggingFace Transformers library. It uses the BART model to generate the summaries.")
53
-
st.write("The model was trained on the CNN/Daily Mail dataset, which contains news articles and their summaries. The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
54
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
55
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
56
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
57
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
58
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
59
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
60
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
61
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
62
-
st.write("The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
55
+
st.write(
56
+
"This is a simple movie plot summarizer built using the HuggingFace Transformers library. It uses the "
57
+
"BART model to generate the summaries.")
58
+
st.write(
59
+
"The model was trained on the CNN/Daily Mail dataset, which contains news articles and their summaries. "
60
+
"The model was fine-tuned on the XSUM dataset, which contains summaries of BBC articles.")
61
+
st.write("You can adjust the length of the summary and the style of summarization (default, verbose, concise).")
62
+
st.write("The model may not always provide accurate summaries, especially for longer or complex plots.")
63
+
st.write("Feel free to experiment with different movie plots and summarization settings! Enjoy!")
64
+
st.write("Note: The model might take a few seconds to generate the summary, so please be patient.")
0 commit comments