Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
import subprocess
|
2 |
-
subprocess.run(["pip", "
|
3 |
subprocess.run(["pip", "install", "gliner"])
|
4 |
-
subprocess.run(["pip", "install", "gradio==4.31.5"])
|
5 |
|
6 |
import gradio as gr
|
7 |
from typing import Dict, Union
|
8 |
from gliner import GLiNER
|
9 |
import gradio as gr
|
10 |
|
11 |
-
model = GLiNER.from_pretrained("BioMike/logical-gliner-
|
12 |
|
13 |
qa_examples = [
|
14 |
[
|
@@ -90,4 +89,4 @@ with gr.Blocks(title="Question Answering Task") as qa_interface:
|
|
90 |
nested_ner.change(fn=process, inputs=[question, input_text, threshold, nested_ner], outputs=output)
|
91 |
|
92 |
qa_interface.queue()
|
93 |
-
qa_interface.launch(
|
|
|
1 |
import subprocess
|
2 |
+
subprocess.run(["pip", "install", "git+https://github.com/huggingface/transformers.git"])
|
3 |
subprocess.run(["pip", "install", "gliner"])
|
|
|
4 |
|
5 |
import gradio as gr
|
6 |
from typing import Dict, Union
|
7 |
from gliner import GLiNER
|
8 |
import gradio as gr
|
9 |
|
10 |
+
model = GLiNER.from_pretrained("BioMike/logical-modern-gliner-bi-base-v1.0").to("cpu")
|
11 |
|
12 |
qa_examples = [
|
13 |
[
|
|
|
89 |
nested_ner.change(fn=process, inputs=[question, input_text, threshold, nested_ner], outputs=output)
|
90 |
|
91 |
qa_interface.queue()
|
92 |
+
qa_interface.launch(share=True)
|