Adam Jirkovsky commited on
Commit
881c367
·
1 Parent(s): a392379

Try to include captcha image

Browse files
Files changed (2) hide show
  1. app.py +4 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -30,6 +30,7 @@ from src.display.utils import (
30
  from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, TOKEN, QUEUE_REPO, REPO_ID, RESULTS_REPO
31
  from src.populate import get_evaluation_queue_df, get_leaderboard_df
32
  from src.submission.submit import add_new_eval
 
33
 
34
 
35
  original_df = None
@@ -348,6 +349,9 @@ with demo:
348
  )
349
  base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
350
  """
 
 
 
351
  submit_button = gr.Button("Submit Eval", interactive=True)
352
  submission_result = gr.Markdown()
353
  submit_button.click(
 
30
  from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, TOKEN, QUEUE_REPO, REPO_ID, RESULTS_REPO
31
  from src.populate import get_evaluation_queue_df, get_leaderboard_df
32
  from src.submission.submit import add_new_eval
33
+ from captcha.image import ImageCaptcha
34
 
35
 
36
  original_df = None
 
349
  )
350
  base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
351
  """
352
+ captcha_image = ImageCaptcha(200, 150)
353
+ captcha_text = captcha_image.generate("1234")
354
+ image = gr.Image(captcha_image)
355
  submit_button = gr.Button("Submit Eval", interactive=True)
356
  submission_result = gr.Markdown()
357
  submit_button.click(
requirements.txt CHANGED
@@ -12,4 +12,5 @@ python-dateutil
12
  requests
13
  tqdm
14
  transformers
15
- tokenizers
 
 
12
  requests
13
  tqdm
14
  transformers
15
+ tokenizers
16
+ captcha