sophcheng commited on
Commit
49b487f
·
verified ·
1 Parent(s): c9b9ecd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -129,16 +129,23 @@ welcome_message = """
129
  # Welcome to AI-nstein!
130
  ## Your AI-driven assistant for all AI-related queries.
131
  """
132
-
133
- topics = """
134
  ### Feel free to ask me anything from the topics below! \nI give you a fun chatbot and an Einstein fact with every answer.
 
 
 
135
  \n- AI Usage
136
  \n- AI Safety
137
  \n- How AI Works
 
 
 
138
  \n- Basics of AI
139
  \n- Fun Facts about AI
140
  \n- Examples of AI
 
141
  """
 
142
  #def display_image():
143
  #return "https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZzdqMnkzcWpjbGhmM3hzcXp0MGpuaTF5djR4bjBxM3Biam5zbzNnMCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/GxMnTi3hV3qaIgbgQL/giphy.gif"
144
  #return "https://cdn-uploads.huggingface.co/production/uploads/6668622b72b61ba78fe7d4bb/PkWjNxvGm9MOqGkZdiT4e.png"
@@ -147,6 +154,7 @@ theme = gr.themes.Monochrome(
147
  secondary_hue="rose",
148
  ).set(
149
  body_text_color='#FFFFFF',
 
150
  background_fill_primary='#81A4CD', # BACKGROUND
151
  background_fill_primary_dark='#81A4CD',
152
  background_fill_secondary='#884e4c', # BUTTON HOVER
@@ -166,11 +174,15 @@ with gr.Blocks(theme=theme) as demo:
166
  with gr.Column():
167
  gr.Image("ally.png", container = False, show_share_button = False, show_download_button = False, label="output", show_label=True, elem_id="output_image", scale=0, width=500)
168
  gr.Markdown(welcome_message) # Display the formatted welcome message
169
- with gr.Row():
170
- with gr.Column():
171
- gr.Markdown(topics) # Show the topics on the left side
172
  with gr.Row():
173
  with gr.Column():
 
 
 
 
 
 
174
  question = gr.Textbox(label="Your question:", placeholder="What do you want to ask about?")
175
  submit_button = gr.Button("Submit!")
176
  answer = gr.Textbox(label="AI-nswer:", placeholder="AI-nstein will respond here...", interactive=False, lines=10)
 
129
  # Welcome to AI-nstein!
130
  ## Your AI-driven assistant for all AI-related queries.
131
  """
132
+ topicList = """
 
133
  ### Feel free to ask me anything from the topics below! \nI give you a fun chatbot and an Einstein fact with every answer.
134
+ """
135
+
136
+ topics1 = """
137
  \n- AI Usage
138
  \n- AI Safety
139
  \n- How AI Works
140
+
141
+ """
142
+ topics2 = """
143
  \n- Basics of AI
144
  \n- Fun Facts about AI
145
  \n- Examples of AI
146
+
147
  """
148
+
149
  #def display_image():
150
  #return "https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZzdqMnkzcWpjbGhmM3hzcXp0MGpuaTF5djR4bjBxM3Biam5zbzNnMCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9cw/GxMnTi3hV3qaIgbgQL/giphy.gif"
151
  #return "https://cdn-uploads.huggingface.co/production/uploads/6668622b72b61ba78fe7d4bb/PkWjNxvGm9MOqGkZdiT4e.png"
 
154
  secondary_hue="rose",
155
  ).set(
156
  body_text_color='#FFFFFF',
157
+ body_text_color_dark='*secondary_50',
158
  background_fill_primary='#81A4CD', # BACKGROUND
159
  background_fill_primary_dark='#81A4CD',
160
  background_fill_secondary='#884e4c', # BUTTON HOVER
 
174
  with gr.Column():
175
  gr.Image("ally.png", container = False, show_share_button = False, show_download_button = False, label="output", show_label=True, elem_id="output_image", scale=0, width=500)
176
  gr.Markdown(welcome_message) # Display the formatted welcome message
177
+
 
 
178
  with gr.Row():
179
  with gr.Column():
180
+ with gr.Row():
181
+ with gr.Column():
182
+ gr.Markdown(topicList)
183
+ with gr.Row(equal_height=True):
184
+ gr.Markdown(topics1) # Show the topics on the left side
185
+ gr.Markdown(topics2)
186
  question = gr.Textbox(label="Your question:", placeholder="What do you want to ask about?")
187
  submit_button = gr.Button("Submit!")
188
  answer = gr.Textbox(label="AI-nswer:", placeholder="AI-nstein will respond here...", interactive=False, lines=10)