added dropdown and customizing the layout with blocks

#1
by gracexf - opened
Files changed (1) hide show
  1. app.py +29 -0
app.py CHANGED
@@ -113,5 +113,34 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
113
  # Return the list of most relevant chunks
114
  return top_chunks
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  chatbot.launch()
 
113
  # Return the list of most relevant chunks
114
  return top_chunks
115
 
116
+ # theme
117
+ custom_theme = gr.themes.Ocean(
118
+ primary_hue="yellow",
119
+ secondary_hue="yellow",
120
+ neutral_hue="rose",
121
+ spacing_size="lg",
122
+ radius_size="lg",
123
+ text_size="lg",
124
+ font=[gr.themes.GoogleFont("Intel One Mono"), "serif"],
125
+ )
126
+
127
+ about_text = """
128
+ ## About this bot
129
+ Our bot will tell how to care for your dog's nutrition.
130
+ Use the chat box on the right to try it out!"""
131
+
132
+ with gr.Blocks(theme=custom_theme) as chatbot:
133
+ with gr.Row(scale=3):
134
+ with gr.Column(scale=1):
135
+ with gr.Row():
136
+ level = gr.Dropdown(
137
+ ["Small", "Medium", "Large"], label="Dog Size", info="What is your dog's size?"
138
+ )
139
+
140
+ #with gr.Column(scale=1):
141
+ #gr.Markdown(about_text)
142
+
143
+ #with gr.Column(scale=2):
144
+ #gr.ChatInterface(echo)
145
 
146
  chatbot.launch()