miscjose commited on
Commit
8e68708
·
1 Parent(s): 500010a

Updated logic

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -90,16 +90,24 @@ if __name__ == '__main__':
90
  embeddings = data['embeddings']
91
  filters = data['filters']
92
 
93
- with gr.Blocks(theme=gr.themes.Soft(primary_hue='blue')) as demo:
 
 
94
  with gr.Row():
95
  with gr.Column(visible=True) as input_col:
 
 
 
 
 
 
96
  query = gr.Textbox(label="What are you looking for?")
97
  number_of_recommendations = gr.Slider(label= "# of Recommendations", minimum=1, maximum=10, value=3, step=1)
98
  genres = gr.Dropdown(label='Genres',multiselect=True,choices=filters['genres'], value=['ALL'])
99
  themes = gr.Dropdown(label='Themes',multiselect=True,choices=filters['themes'], value=['ALL'])
100
- rating = gr.Dropdown(label='Rating',multiselect=True,choices=filters['rating'], value=['PG - Children','PG-13 - Teens 13 or older','G - All Ages','R - 17+ (violence & profanity)'])
101
- objective_weight = gr.Slider(label= "Objective Weight", minimum=0, maximum=1, value=.7, step=.1)
102
- subjective_weight = gr.Slider(label= "Subjective Weight", minimum=0, maximum=1, value=.3, step=.1)
103
  submit_btn = gr.Button("Submit")
104
 
105
  examples = gr.Examples(
 
90
  embeddings = data['embeddings']
91
  filters = data['filters']
92
 
93
+
94
+
95
+ with gr.Blocks(theme=gr.themes.Soft(primary_hue='red')) as demo:
96
  with gr.Row():
97
  with gr.Column(visible=True) as input_col:
98
+
99
+ gr.Markdown(
100
+ '''
101
+ # Welcome to the Nuanced Recommendation System!
102
+ ### This system **combines** both objective (synopsis, episode count, themes) and subjective (user reviews) data, in order to recommend the most approprate anime. Feel free to refine using the **optional** filters below!
103
+ ''')
104
  query = gr.Textbox(label="What are you looking for?")
105
  number_of_recommendations = gr.Slider(label= "# of Recommendations", minimum=1, maximum=10, value=3, step=1)
106
  genres = gr.Dropdown(label='Genres',multiselect=True,choices=filters['genres'], value=['ALL'])
107
  themes = gr.Dropdown(label='Themes',multiselect=True,choices=filters['themes'], value=['ALL'])
108
+ rating = gr.Dropdown(label='Rating',multiselect=True,choices=filters['rating'], value=['ALL'])
109
+ objective_weight = gr.Slider(label= "Objective Weight", minimum=0, maximum=1, value=.5, step=.1)
110
+ subjective_weight = gr.Slider(label= "Subjective Weight", minimum=0, maximum=1, value=.5, step=.1)
111
  submit_btn = gr.Button("Submit")
112
 
113
  examples = gr.Examples(