Skip to content

Commit

Permalink
Merge pull request #53 from DSProjects2024/abhinavdv/fix-formatting-i…
Browse files Browse the repository at this point in the history
…n-app.py

Formatting issues fixed in UI
  • Loading branch information
swarali-desai authored Mar 13, 2024
2 parents 5e9f5f3 + 2e04f0d commit 474fd9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ To create the 'thronetalks' conda environment which contains all the required pa
conda env create -f environment.yml
conda activate thronetalks
```
The second commande activates the specific environemnt.
The second command activates the specific environemnt.


If you want to deactivate this environment in the future, then use the command:
Expand Down
20 changes: 11 additions & 9 deletions thronetalk-game-of-thrones-summarizer/app.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
"""
Game of Thrones - Episode Summarizer App
This Streamlit application provides a user interface for summarizing episodes of Game of Thrones.
It includes sentiment analysis, word clouds, episode summaries,
This Streamlit application provides a user interface
for summarizing episodes of Game of Thrones.
It includes sentiment analysis, word clouds, episode summaries,
and images from the selected range of episodes.
Usage:
1. Select the desired range of episodes using the provided dropdown menus
1. Select the desired range of episodes using the provided dropdown menus
for season and episode numbers.
2. Click on the "Generate Summary" button to generate the episode summary for the
selected range of episodes and sentiment analysis and word clouds for top 3 characters.
3. Scroll down to view the generated content, including the episode summary,
2. Click on the "Generate Summary" button to generate the episode summary for the
selected range of episodes and sentiment
analysis and word clouds for top 3 characters.
3. Scroll down to view the generated content, including the episode summary,
sentiment analysis, word clouds, and images.
"""
Expand All @@ -19,10 +21,10 @@
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt
import altair as alt
from utils.model import Model
from utils.visualization_generator import VisualizationGenerator, read_dataframe
from utils.data_analysis import DataAnalysis
import altair as alt

st.set_page_config(layout="wide")
current_directory = os.path.dirname(__file__)
Expand All @@ -39,10 +41,10 @@ def remove_zeros(lst):
output = [1, 2, 3]
"""
return [x for x in lst if x != '0']
st.title('Game of Thrones - Episode Summarizer')
st.title('Game of Thrones - Summarizer')
df = pd.read_csv(csv_file_path)
seasons = df.columns.tolist()
st.sidebar.title('Pick From and To Season - Episode')
st.sidebar.title('Select Season : Episode range')
st.sidebar.header('From')
season_from = st.sidebar.selectbox("Season", seasons, key=0)
selected_season_episode_list1 = df[season_from]
Expand Down
2 changes: 1 addition & 1 deletion thronetalk-game-of-thrones-summarizer/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_tile(self):
"""
Test if the app title is correct.
"""
self.assertEqual(self.app_test.title[0].value, 'Game of Thrones - Episode Summarizer')
self.assertEqual(self.app_test.title[0].value, 'Game of Thrones - Summarizer')

@patch('utils.model.Model.azure_api_call', side_effect=mock_model_azure_api_call)
def test_sidebar_selectboxes(self, _):
Expand Down

0 comments on commit 474fd9b

Please sign in to comment.