max-long commited on
Commit
7fd6f11
·
verified ·
1 Parent(s): e947e04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ dataset_iter = load_dataset(
12
  ).shuffle(seed=42) # Shuffle added
13
 
14
  # Load the model
15
- model = GLiNER.from_pretrained("max-long/textile_machines_3_oct", trust_remote_code=True)
16
 
17
  def ner(text: str, labels: str, threshold: float, nested_ner: bool):
18
  # Convert user-provided labels (comma-separated string) into a list
@@ -44,7 +44,7 @@ with gr.Blocks(title="General NER with Color-Coded Output") as demo:
44
 
45
  # Display a random example
46
  input_text = gr.Textbox(
47
- value="The machine is fed by means of an endless apron, the wool entering at the smaller end...",
48
  label="Text input",
49
  placeholder="Enter your text here",
50
  lines=5
@@ -52,7 +52,7 @@ with gr.Blocks(title="General NER with Color-Coded Output") as demo:
52
 
53
  with gr.Row() as row:
54
  labels = gr.Textbox(
55
- value="Machine, Wool", # Default example labels
56
  label="Labels",
57
  placeholder="Enter your labels here (comma separated)",
58
  scale=2,
 
12
  ).shuffle(seed=42) # Shuffle added
13
 
14
  # Load the model
15
+ model = GLiNER.from_pretrained("urchade/gliner_multi-v2.1", trust_remote_code=True)
16
 
17
  def ner(text: str, labels: str, threshold: float, nested_ner: bool):
18
  # Convert user-provided labels (comma-separated string) into a list
 
44
 
45
  # Display a random example
46
  input_text = gr.Textbox(
47
+ value="Click 'Get New Snippet' to load a random sample from the British Library Dataset",
48
  label="Text input",
49
  placeholder="Enter your text here",
50
  lines=5
 
52
 
53
  with gr.Row() as row:
54
  labels = gr.Textbox(
55
+ value="People, Places", # Default example labels
56
  label="Labels",
57
  placeholder="Enter your labels here (comma separated)",
58
  scale=2,