gursul commited on
Commit
3cf2011
·
verified ·
1 Parent(s): d858b66

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -332,6 +332,12 @@ ensure_json_file(GERMAN_WORDS_FILE)
332
  eng_data = load_english()
333
  ger_data = load_german()
334
 
 
 
 
 
 
 
335
  # Gradio UI
336
  with gr.Blocks(fill_width=False) as demo:
337
  with gr.Tab("Word Translation"):
@@ -378,12 +384,13 @@ with gr.Blocks(fill_width=False) as demo:
378
  article_in = gr.Textbox(label="Artikel (der/die/das) — only for nouns")
379
  german_in = gr.Textbox(label="German Translation")
380
  add_btn = gr.Button("Add Word")
381
- add_result = gr.Markdown()
382
  with gr.Column():
383
  delete_word_in = gr.Textbox(label="Word to Delete")
384
  delete_lang_in = gr.Dropdown(label="Language", choices=["English", "Deutsch"], value="English")
385
  delete_btn = gr.Button("Delete Word")
386
- delete_result = gr.Markdown()
 
387
 
388
  with gr.Row(equal_height=True):
389
  search_box = gr.Textbox(label="Search words", placeholder="Type to filter...", scale=5)
 
332
  eng_data = load_english()
333
  ger_data = load_german()
334
 
335
+ MEME_PATH = hf_hub_download(
336
+ repo_id=DATASET_REPO,
337
+ filename="gradio_meme.jpeg",
338
+ repo_type="dataset"
339
+ )
340
+
341
  # Gradio UI
342
  with gr.Blocks(fill_width=False) as demo:
343
  with gr.Tab("Word Translation"):
 
384
  article_in = gr.Textbox(label="Artikel (der/die/das) — only for nouns")
385
  german_in = gr.Textbox(label="German Translation")
386
  add_btn = gr.Button("Add Word")
387
+ add_result = gr.Markdown("Let's add some words!!!")
388
  with gr.Column():
389
  delete_word_in = gr.Textbox(label="Word to Delete")
390
  delete_lang_in = gr.Dropdown(label="Language", choices=["English", "Deutsch"], value="English")
391
  delete_btn = gr.Button("Delete Word")
392
+ delete_result = gr.Markdown("So you're deleting me...")
393
+ meme_img = gr.Image(value=MEME_PATH, label="Fun Meme", show_download_button=False)
394
 
395
  with gr.Row(equal_height=True):
396
  search_box = gr.Textbox(label="Search words", placeholder="Type to filter...", scale=5)