srijaydeshpande commited on
Commit
178388d
·
verified ·
1 Parent(s): ab91534

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -194,24 +194,24 @@ def pdf_to_text(files, maxtokens=2048, temperature=0, top_probability=0.95):
194
  return anonymized_text
195
 
196
 
197
- # css = ".gradio-container {background: 'logo.png'}"
198
- # temp_slider = gr.Slider(minimum=0, maximum=2, value=0.9, label="Temperature Value")
199
- # prob_slider = gr.Slider(minimum=0, maximum=1, value=0.95, label="Max Probability Value")
200
- # max_tokens = gr.Number(value=600, label="Max Tokens")
201
- # input_folder = gr.File(file_count='multiple')
202
- # input_folder_text = gr.Textbox(label='Enter output folder path')
203
- # output_text = gr.Textbox()
204
- # output_path_component = gr.File(label="Select Output Path")
205
- # iface = gr.Interface(
206
- # fn=pdf_to_text,
207
- # inputs='file',
208
- # # inputs=["textbox", input_folder_text, "textbox", max_tokens, temp_slider, prob_slider],
209
- # outputs=output_text,
210
- # title='COBIx Endoscopy Report De-Identification',
211
- # description="This application assists to remove personal information from the uploaded clinical report",
212
- # theme=gr.themes.Soft(),
213
- # )
214
- # iface.launch()
215
 
216
  # import spaces
217
  # import json
 
194
  return anonymized_text
195
 
196
 
197
+ css = ".gradio-container {background: 'logo.png'}"
198
+ temp_slider = gr.Slider(minimum=0, maximum=2, value=0.9, label="Temperature Value")
199
+ prob_slider = gr.Slider(minimum=0, maximum=1, value=0.95, label="Max Probability Value")
200
+ max_tokens = gr.Number(value=600, label="Max Tokens")
201
+ input_folder = gr.File(file_count='multiple')
202
+ input_folder_text = gr.Textbox(label='Enter output folder path')
203
+ output_text = gr.Textbox()
204
+ output_path_component = gr.File(label="Select Output Path")
205
+ iface = gr.Interface(
206
+ fn=pdf_to_text,
207
+ inputs='file',
208
+ # inputs=["textbox", input_folder_text, "textbox", max_tokens, temp_slider, prob_slider],
209
+ outputs=output_text,
210
+ title='COBIx Endoscopy Report De-Identification',
211
+ description="This application assists to remove personal information from the uploaded clinical report",
212
+ theme=gr.themes.Soft(),
213
+ )
214
+ iface.launch()
215
 
216
  # import spaces
217
  # import json