Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,12 @@ from numpy import mean
|
|
| 6 |
import pandas as pd
|
| 7 |
import matplotlib.pyplot as plt
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
# Load tokenizers and models
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained("suriya7/bart-finetuned-text-summarization")
|
| 11 |
model = AutoModelForSeq2SeqLM.from_pretrained("suriya7/bart-finetuned-text-summarization")
|
|
@@ -143,7 +149,7 @@ def plot_sentiments(sentiments):
|
|
| 143 |
return 'sentiments_distribution.png'
|
| 144 |
|
| 145 |
# Gradio interface
|
| 146 |
-
with gr.Blocks() as demo:
|
| 147 |
with gr.Tabs():
|
| 148 |
with gr.TabItem("Upload and Filter"):
|
| 149 |
with gr.Row():
|
|
@@ -189,4 +195,4 @@ with gr.Blocks() as demo:
|
|
| 189 |
clear_button_upload.click(lambda: (""), outputs=[keywords_input])
|
| 190 |
clear_button_review.click(lambda: ("", "", "", "", ""), outputs=[review_input, review_rating, review_summary, review_keywords, review_sentiment])
|
| 191 |
|
| 192 |
-
demo.launch(share=True)
|
|
|
|
| 6 |
import pandas as pd
|
| 7 |
import matplotlib.pyplot as plt
|
| 8 |
|
| 9 |
+
theme = gr.themes.Soft(
|
| 10 |
+
primary_hue="amber",
|
| 11 |
+
secondary_hue="amber",
|
| 12 |
+
neutral_hue="stone",
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
# Load tokenizers and models
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained("suriya7/bart-finetuned-text-summarization")
|
| 17 |
model = AutoModelForSeq2SeqLM.from_pretrained("suriya7/bart-finetuned-text-summarization")
|
|
|
|
| 149 |
return 'sentiments_distribution.png'
|
| 150 |
|
| 151 |
# Gradio interface
|
| 152 |
+
with gr.Blocks(theme=theme) as demo:
|
| 153 |
with gr.Tabs():
|
| 154 |
with gr.TabItem("Upload and Filter"):
|
| 155 |
with gr.Row():
|
|
|
|
| 195 |
clear_button_upload.click(lambda: (""), outputs=[keywords_input])
|
| 196 |
clear_button_review.click(lambda: ("", "", "", "", ""), outputs=[review_input, review_rating, review_summary, review_keywords, review_sentiment])
|
| 197 |
|
| 198 |
+
demo.launch(share=True)
|