shree256 commited on
Commit
2a996fc
·
1 Parent(s): 64eec9f

updates with biobert

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1,6 +1,10 @@
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
 
 
 
4
 
5
  # Load BioBERT-based model for NER/PHI detection
6
  # Using a model fine-tuned for medical NER or a general NER model
@@ -130,4 +134,9 @@ demo = gr.Interface(
130
  )
131
 
132
  if __name__ == "__main__":
133
- demo.launch()
 
 
 
 
 
 
1
+ import warnings
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
+ # Suppress known warnings
6
+ warnings.filterwarnings("ignore", category=FutureWarning, module="torch.distributed")
7
+
8
 
9
  # Load BioBERT-based model for NER/PHI detection
10
  # Using a model fine-tuned for medical NER or a general NER model
 
134
  )
135
 
136
  if __name__ == "__main__":
137
+ demo.launch(
138
+ server_name="0.0.0.0",
139
+ server_port=7860,
140
+ share=False, # Set to True if you want a public link
141
+ show_error=True,
142
+ )