oumayma03 commited on
Commit
02dcd21
Β·
verified Β·
1 Parent(s): 0317108

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -17
app.py CHANGED
@@ -171,27 +171,25 @@ def get_embed_url(raw_url: str) -> str:
171
 
172
  # --- GRADIO INTERFACE ---
173
  if __name__ == "__main__":
174
- load_data_and_create_vectorstore()
175
- if retriever is None or client is None:
176
- print("Gradio interface will not run due to RAG/LLM initialization errors.")
177
-
178
- else:
179
- with gr.Blocks(title="Moul Lmemes 🎬") as demo:
180
- gr.Markdown("# Moul Lmemes 🎬")
181
- gr.Markdown("Write what you are looking for and i will find the most revelant moroccan meme for you πŸ”")
182
-
183
- with gr.Tab("Search Memes"):
184
- search_input = gr.Textbox(label="Type something")
185
- search_button = gr.Button("Find Meme")
186
- search_output_video = gr.HTML(label="Top Meme Video")
187
- search_output_text = gr.Textbox(label="Results")
188
-
189
- search_button.click(
190
  fn=query_memes,
191
  inputs=search_input,
192
  outputs=[search_output_video, search_output_text]
193
  )
194
- gr.Examples(
195
  examples=[["a man running"],["sharing"],["immigrant in france"]],
196
  inputs=search_input,
197
  outputs=[search_output_video, search_output_text],
 
171
 
172
  # --- GRADIO INTERFACE ---
173
  if __name__ == "__main__":
174
+ # load_data_and_create_vectorstore()
175
+ # if retriever is None or client is None:
176
+ # print("Gradio interface will not run due to RAG/LLM initialization errors.")
177
+
178
+ # else:
179
+ with gr.Blocks(title="Moul Lmemes 🎬") as demo:
180
+ gr.Markdown("# Moul Lmemes 🎬")
181
+ gr.Markdown("Write what you are looking for and i will find the most revelant moroccan meme for you πŸ”")
182
+ with gr.Tab("Search Memes"):
183
+ search_input = gr.Textbox(label="Type something")
184
+ search_button = gr.Button("Find Meme")
185
+ search_output_video = gr.HTML(label="Top Meme Video")
186
+ search_output_text = gr.Textbox(label="Results")
187
+ search_button.click(
 
 
188
  fn=query_memes,
189
  inputs=search_input,
190
  outputs=[search_output_video, search_output_text]
191
  )
192
+ gr.Examples(
193
  examples=[["a man running"],["sharing"],["immigrant in france"]],
194
  inputs=search_input,
195
  outputs=[search_output_video, search_output_text],