Adam Jirkovsky commited on
Commit
27baef7
·
1 Parent(s): b1770cd
Files changed (2) hide show
  1. app.py +5 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -31,6 +31,7 @@ from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, TOKEN, QUEUE_RE
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,9 +350,10 @@ with demo:
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_data = captcha_image.generate("1234")
354
- #image = gr.Image(captcha_data)
 
355
  submit_button = gr.Button("Submit Eval", interactive=True)
356
  submission_result = gr.Markdown()
357
  submit_button.click(
 
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
+ from PIL import Image
35
 
36
 
37
  original_df = None
 
350
  )
351
  base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
352
  """
353
+ captcha_obj = ImageCaptcha(200, 150)
354
+ captcha_data = captcha_obj.generate("1234")
355
+ image = Image.open(captcha_data)
356
+ captcha_img = gr.Image(image)
357
  submit_button = gr.Button("Submit Eval", interactive=True)
358
  submission_result = gr.Markdown()
359
  submit_button.click(
requirements.txt CHANGED
@@ -13,4 +13,5 @@ requests
13
  tqdm
14
  transformers
15
  tokenizers
16
- captcha
 
 
13
  tqdm
14
  transformers
15
  tokenizers
16
+ captcha
17
+ pillow