Liori25 commited on
Commit
e686e66
Β·
verified Β·
1 Parent(s): 1b52109

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -17
app.py CHANGED
@@ -143,28 +143,41 @@ def search_apps(user_query):
143
  except Exception as e:
144
  return f"<div style='color:red;'>Error: {str(e)}</div>"
145
 
146
- # --- 3. The UI ---
147
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
148
 
149
  gr.Markdown("# πŸ“± AI App Recommender")
150
  gr.Markdown("Describe what you need, and the AI will find the best apps for you.")
151
 
152
- with gr.Column():
153
- with gr.Row():
154
- txt_input = gr.Textbox(
155
- show_label=False,
156
- placeholder="Type here... (e.g., 'I need a puzzle game for kids')",
157
- scale=4
158
- )
159
- btn_submit = gr.Button("πŸš€ Find Apps", variant="primary", scale=1)
160
 
161
- gr.Examples(
162
- examples=[["I want a timer for my kitchen"], ["A game to learn math"]],
163
- inputs=txt_input
164
- )
165
-
166
- output_html = gr.HTML(label="Recommended Apps")
167
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  # --- FOOTER ---
169
  gr.Markdown(
170
  """
@@ -174,7 +187,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
174
  """
175
  )
176
 
 
177
  btn_submit.click(fn=search_apps, inputs=txt_input, outputs=output_html)
178
  txt_input.submit(fn=search_apps, inputs=txt_input, outputs=output_html)
179
 
180
- demo.launch()
 
143
  except Exception as e:
144
  return f"<div style='color:red;'>Error: {str(e)}</div>"
145
 
146
+ # --- 3. The UI (Modified with Tabs) ---
147
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
148
 
149
  gr.Markdown("# πŸ“± AI App Recommender")
150
  gr.Markdown("Describe what you need, and the AI will find the best apps for you.")
151
 
152
+ # --- TABS START HERE ---
153
+ with gr.Tabs():
 
 
 
 
 
 
154
 
155
+ # --- TAB 1: SEARCH APP ---
156
+ with gr.Tab("πŸ” Find Apps"):
157
+ with gr.Column():
158
+ with gr.Row():
159
+ txt_input = gr.Textbox(
160
+ show_label=False,
161
+ placeholder="Type here... (e.g., 'I need a puzzle game for kids')",
162
+ scale=4
163
+ )
164
+ btn_submit = gr.Button("πŸš€ Find Apps", variant="primary", scale=1)
165
+
166
+ gr.Examples(
167
+ examples=[["I want a timer for my kitchen"], ["A game to learn math"]],
168
+ inputs=txt_input
169
+ )
170
+
171
+ output_html = gr.HTML(label="Recommended Apps")
172
+
173
+ # --- TAB 2: VIDEO PRESENTATION ---
174
+ with gr.Tab("πŸŽ₯ Video Presentation"):
175
+ gr.Markdown("### Watch our project presentation below:")
176
+
177
+ # Using 'PresentationVideo' assuming it's the exact name of your uploaded file
178
+ # interactive=False prevents users from downloading/changing it
179
+ gr.Video(value="PresentationVideo", interactive=False)
180
+
181
  # --- FOOTER ---
182
  gr.Markdown(
183
  """
 
187
  """
188
  )
189
 
190
+ # Logic connection
191
  btn_submit.click(fn=search_apps, inputs=txt_input, outputs=output_html)
192
  txt_input.submit(fn=search_apps, inputs=txt_input, outputs=output_html)
193
 
194
+ demo.launch()