Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,11 +72,22 @@ def analyze_sentiment(sentence):
|
|
| 72 |
"score": rf_model.predict_proba([sentence]).max()}
|
| 73 |
|
| 74 |
return sentence, results
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
# Create a custom theme with
|
| 77 |
custom_theme = gr.themes.Default(
|
| 78 |
-
text_size=
|
| 79 |
-
font=[gr.themes.GoogleFont("Source Sans Pro"), "Arial", "sans-serif"]
|
| 80 |
)
|
| 81 |
|
| 82 |
# Create Gradio interface with the custom theme
|
|
|
|
| 72 |
"score": rf_model.predict_proba([sentence]).max()}
|
| 73 |
|
| 74 |
return sentence, results
|
| 75 |
+
# Define a custom extra small size
|
| 76 |
+
text_xxs = gr.themes.Size(
|
| 77 |
+
name="text_xxs",
|
| 78 |
+
xxs=10, # You can adjust this value to get your desired font size
|
| 79 |
+
xs=12,
|
| 80 |
+
sm=14,
|
| 81 |
+
md=16,
|
| 82 |
+
lg=18,
|
| 83 |
+
xl=20,
|
| 84 |
+
xxl=22
|
| 85 |
+
)
|
| 86 |
|
| 87 |
+
# Create a custom theme with extra small font size
|
| 88 |
custom_theme = gr.themes.Default(
|
| 89 |
+
text_size=text_xxs, # Use our custom extra small size
|
| 90 |
+
font=[gr.themes.GoogleFont("Source Sans Pro"), "Arial", "sans-serif"]
|
| 91 |
)
|
| 92 |
|
| 93 |
# Create Gradio interface with the custom theme
|