Almaatla commited on
Commit
108ada8
1 Parent(s): fe257d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -28,6 +28,7 @@ with gr.Blocks() as demo:
28
  with gr.Tab("Upload PDF & TXT"):
29
  docs_input = gr.File(file_count="single", file_types=[".pdf"])
30
  tb_tokenCount = gr.Textbox(label='Number of tokens')
 
31
  btn_count = gr.Button("Count token")
32
  btn_count.click(count_tokens_in_file,inputs=[docs_input],outputs=[tb_tokenCount])
33
 
 
28
  with gr.Tab("Upload PDF & TXT"):
29
  docs_input = gr.File(file_count="single", file_types=[".pdf"])
30
  tb_tokenCount = gr.Textbox(label='Number of tokens')
31
+ docs_input.upload(count_tokens_in_file,inputs=[docs_input],outputs=[tb_tokenCount])
32
  btn_count = gr.Button("Count token")
33
  btn_count.click(count_tokens_in_file,inputs=[docs_input],outputs=[tb_tokenCount])
34