gursul commited on
Commit
4c10fc7
·
verified ·
1 Parent(s): d90da8d

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -12,7 +12,7 @@ DATASET_REPO = "gursul/german_exercise_dataset"
12
  ENGLISH_WORDS_FILE = "en_de.json"
13
  GERMAN_WORDS_FILE = "de_en.json"
14
 
15
- PASSWORD = "setriavret"
16
 
17
  # Authenticate once at startup
18
  if "HF_TOKEN" in os.environ:
@@ -335,8 +335,8 @@ eng_data = load_english()
335
  ger_data = load_german()
336
 
337
  MEME_PATH = hf_hub_download(
338
- repo_id=DATASET_REPO,
339
- filename="gradio_meme.jpg",
340
  repo_type="dataset"
341
  )
342
 
@@ -435,11 +435,11 @@ with gr.Blocks() as demo:
435
  add_result = gr.Markdown("Let's add some words!!!")
436
  with gr.Column():
437
  meme_img = gr.Image(
438
- value=MEME_PATH,
439
- label="Fun Meme",
440
- show_download_button=False,
441
- show_label=False,
442
- show_share_button=False,
443
  show_fullscreen_button=False,
444
  height=159, #320x215
445
  width=320*(159/215)-1
 
12
  ENGLISH_WORDS_FILE = "en_de.json"
13
  GERMAN_WORDS_FILE = "de_en.json"
14
 
15
+ PASSWORD = os.getenv("ADMIN_PASSWORD")
16
 
17
  # Authenticate once at startup
18
  if "HF_TOKEN" in os.environ:
 
335
  ger_data = load_german()
336
 
337
  MEME_PATH = hf_hub_download(
338
+ repo_id=DATASET_REPO,
339
+ filename="gradio_meme.jpg",
340
  repo_type="dataset"
341
  )
342
 
 
435
  add_result = gr.Markdown("Let's add some words!!!")
436
  with gr.Column():
437
  meme_img = gr.Image(
438
+ value=MEME_PATH,
439
+ label="Fun Meme",
440
+ show_download_button=False,
441
+ show_label=False,
442
+ show_share_button=False,
443
  show_fullscreen_button=False,
444
  height=159, #320x215
445
  width=320*(159/215)-1