Vishaltiwari2019 commited on
Commit
0bf1bd0
·
verified ·
1 Parent(s): 23610b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -1
app.py CHANGED
@@ -31,12 +31,37 @@ emotion_title = "Texts Expressing Emotion with Speech"
31
  emotion_description = "This AI model classifies texts expressing human emotion and converts them into speech."
32
  emotion_examples = [["He is very happy today", "Free Palestine"]]
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  combined_demo = gr.Interface(
35
  fn=classify_emotion_and_speech,
36
  inputs="textbox",
37
  outputs=["text", "audio"],
38
  title=emotion_title,
39
- theme=theme,
40
  description=emotion_description,
41
  examples=emotion_examples,
42
  )
@@ -46,3 +71,4 @@ combined_demo_tabbed = gr.TabbedInterface([tts_demo, combined_demo], ["Text to S
46
 
47
  if __name__ == "__main__":
48
  combined_demo_tabbed.launch()
 
 
31
  emotion_description = "This AI model classifies texts expressing human emotion and converts them into speech."
32
  emotion_examples = [["He is very happy today", "Free Palestine"]]
33
 
34
+ # Define a theme for the Gradio interface
35
+ theme = {
36
+ "container": {
37
+ "background-color": "#007bff",
38
+ "color": "#fff",
39
+ "padding": "20px",
40
+ },
41
+ "textbox": {
42
+ "background-color": "#fff",
43
+ "border-radius": "5px",
44
+ "padding": "10px",
45
+ "margin-bottom": "10px",
46
+ },
47
+ "button": {
48
+ "background-color": "#007bff",
49
+ "color": "#fff",
50
+ "padding": "10px",
51
+ "border-radius": "5px",
52
+ "cursor": "pointer",
53
+ },
54
+ "label": {
55
+ "color": "#fff",
56
+ },
57
+ }
58
+
59
  combined_demo = gr.Interface(
60
  fn=classify_emotion_and_speech,
61
  inputs="textbox",
62
  outputs=["text", "audio"],
63
  title=emotion_title,
64
+ theme=theme, # Include the theme here
65
  description=emotion_description,
66
  examples=emotion_examples,
67
  )
 
71
 
72
  if __name__ == "__main__":
73
  combined_demo_tabbed.launch()
74
+