Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|