jjz5463 commited on
Commit
973ef52
1 Parent(s): f4dbfcc

theme update

Browse files
Files changed (1) hide show
  1. app.py +2 -56
app.py CHANGED
@@ -71,63 +71,9 @@ def chat(user_input, history):
71
  invalid_response = "Invalid input. Please use the format: <Number>. <Description>: query"
72
  return invalid_response
73
 
74
- css = """
75
- /* Overall Background and Text */
76
- body {
77
- background-color: #1e1e2f;
78
- color: #e0e0e0;
79
- }
80
-
81
- .gradio-container {
82
- background-color: #1e1e2f;
83
- color: #e0e0e0;
84
- }
85
-
86
- /* Markdown Heading */
87
- .gr-markdown {
88
- color: #c3e88d;
89
- }
90
-
91
- /* Textbox Styles */
92
- .gr-textbox input[type="text"], .gr-textbox textarea {
93
- background-color: #2e2e3e;
94
- color: #dcdcdc;
95
- border: 1px solid #44475a;
96
- }
97
-
98
- .gr-textbox input[type="text"]::placeholder, .gr-textbox textarea::placeholder {
99
- color: #777;
100
- }
101
-
102
- /* Button Styles */
103
- .gr-button {
104
- background-color: #3b3b57;
105
- color: #ffffff;
106
- border: 1px solid #4c4c66;
107
- }
108
-
109
- .gr-button:hover {
110
- background-color: #4c4c66;
111
- color: #ffffff;
112
- }
113
-
114
- /* Chat Interface */
115
- .gr-chatinterface {
116
- background-color: #1e1e2f;
117
- color: #e0e0e0;
118
- border: 1px solid #44475a;
119
- }
120
-
121
- /* Status Textbox */
122
- .gr-textbox .status {
123
- background-color: #2e2e3e;
124
- color: #c3e88d;
125
- border: 1px solid #44475a;
126
- }
127
- """
128
 
129
  # Gradio Interface using ChatInterface
130
- with gr.Blocks(fill_height=True, css=css) as demo:
131
  gr.Markdown("## Simulator Setup")
132
 
133
  # Input fields for initialization
@@ -140,7 +86,7 @@ with gr.Blocks(fill_height=True, css=css) as demo:
140
  status = gr.Textbox(label="Status", interactive=False)
141
 
142
  # Chat interface to handle user interactions
143
- chat_interface = gr.ChatInterface(fn=chat)
144
 
145
  # Define the callback function to initialize the simulator and update status
146
  def initialize_and_start_chat(task, app_name, sitemap):
 
71
  invalid_response = "Invalid input. Please use the format: <Number>. <Description>: query"
72
  return invalid_response
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  # Gradio Interface using ChatInterface
76
+ with gr.Blocks(fill_height=True, theme=gr.themes.Ocean()) as demo:
77
  gr.Markdown("## Simulator Setup")
78
 
79
  # Input fields for initialization
 
86
  status = gr.Textbox(label="Status", interactive=False)
87
 
88
  # Chat interface to handle user interactions
89
+ chat_interface = gr.ChatInterface(fn=chat, type='messages')
90
 
91
  # Define the callback function to initialize the simulator and update status
92
  def initialize_and_start_chat(task, app_name, sitemap):