nam194 commited on
Commit
012faab
1 Parent(s): 44f30a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -1,9 +1,8 @@
1
- import numpy as np
2
- import pdf2image
3
  import gradio as gr
4
  from imports import *
5
- from huggingface_hub import login
6
  login(token="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")
 
 
7
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8
  dict_ = {
9
  0: "negative",
@@ -74,9 +73,9 @@ with gr.Blocks() as demo:
74
  text_output = gr.Textbox(label="Result:")
75
  text_button = gr.Button("Predict")
76
  with gr.Tab("Extract infomation from resume"):
77
- with gr.Row():
78
- file_input = gr.File(label="PDF", file_types=[".pdf"])
79
- image_output = gr.Image(type="numpy", label="Image of the first page")
80
  image_button = gr.Button("Predict")
81
 
82
  # with gr.Accordion("Open for More!"):
 
 
 
1
  import gradio as gr
2
  from imports import *
 
3
  login(token="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")
4
+
5
+
6
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
7
  dict_ = {
8
  0: "negative",
 
73
  text_output = gr.Textbox(label="Result:")
74
  text_button = gr.Button("Predict")
75
  with gr.Tab("Extract infomation from resume"):
76
+ # with gr.Row():
77
+ file_input = gr.inputs.File(label="Upload pdf", file_types=[".pdf"])
78
+ image_output = gr.Image(type="numpy", label="Image of the first page")
79
  image_button = gr.Button("Predict")
80
 
81
  # with gr.Accordion("Open for More!"):