parsa-mhmdi commited on
Commit
225a8a9
·
1 Parent(s): a611525

Initial commit for NER Gradio app

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +4 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load NER model from Hugging Face Hub
5
- model_checkpoint = "." # Replace with your Hugging Face repo
6
  ner_pipeline = pipeline("token-classification", model=model_checkpoint, tokenizer=model_checkpoint)
7
 
8
  # Define function for Gradio
 
2
  from transformers import pipeline
3
 
4
  # Load NER model from Hugging Face Hub
5
+ model_checkpoint = "./" # Replace with your Hugging Face repo
6
  ner_pipeline = pipeline("token-classification", model=model_checkpoint, tokenizer=model_checkpoint)
7
 
8
  # Define function for Gradio
requirements.txt CHANGED
@@ -1 +1,4 @@
1
- huggingface_hub==0.25.2
 
 
 
 
1
+ huggingface_hub==0.25.2
2
+ transformers
3
+ torch
4
+ gradio