Spaces:
Running
Running
model-replacement-runtime (#2)
Browse files- fix runtime: model replacement (319c595eeb7cf7d5831d03bd20982702ec0cc6db)
Co-authored-by: Dmytro <werent4@users.noreply.huggingface.co>
- interfaces/classification.py +1 -1
- interfaces/landing.py +1 -1
- interfaces/ner.py +1 -1
- interfaces/open_ie.py +1 -1
- interfaces/qa.py +1 -1
- interfaces/relation_e.py +1 -1
- interfaces/summarization.py +1 -1
- interfaces/universal.py +1 -1
- materials/introduction.html +1 -1
interfaces/classification.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from gliner import GLiNER
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 5 |
|
| 6 |
PROMPT_TEMPLATE = """Classify the given text having the following classes: {}"""
|
| 7 |
classification_examples = [
|
|
|
|
| 1 |
from gliner import GLiNER
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to("cpu")
|
| 5 |
|
| 6 |
PROMPT_TEMPLATE = """Classify the given text having the following classes: {}"""
|
| 7 |
classification_examples = [
|
interfaces/landing.py
CHANGED
|
@@ -21,7 +21,7 @@ with gr.Blocks() as landing_interface:
|
|
| 21 |
gr.Code(
|
| 22 |
'''
|
| 23 |
from gliner import GLiNER
|
| 24 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 25 |
text = "Your text here"
|
| 26 |
labels = ["person", "award", "date", "competitions", "teams"]
|
| 27 |
entities = model.predict_entities(text, labels)
|
|
|
|
| 21 |
gr.Code(
|
| 22 |
'''
|
| 23 |
from gliner import GLiNER
|
| 24 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5")
|
| 25 |
text = "Your text here"
|
| 26 |
labels = ["person", "award", "date", "competitions", "teams"]
|
| 27 |
entities = model.predict_entities(text, labels)
|
interfaces/ner.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Dict, Union
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
|
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to("cpu")
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
interfaces/open_ie.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Dict, Union
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
|
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to("cpu")
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
interfaces/qa.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Dict, Union
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 6 |
|
| 7 |
text2 = """
|
| 8 |
Apple Inc. is an American multinational technology company headquartered in Cupertino, California. Apple is the world's largest technology company by revenue, with US$394.3 billion in 2022 revenue. As of March 2023, Apple is the world's biggest company by market capitalization. As of June 2022, Apple is the fourth-largest personal computer vendor by unit sales and the second-largest mobile phone manufacturer in the world. It is considered one of the Big Five American information technology companies, alongside Alphabet (parent company of Google), Amazon, Meta Platforms, and Microsoft.
|
|
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to("cpu")
|
| 6 |
|
| 7 |
text2 = """
|
| 8 |
Apple Inc. is an American multinational technology company headquartered in Cupertino, California. Apple is the world's largest technology company by revenue, with US$394.3 billion in 2022 revenue. As of March 2023, Apple is the world's biggest company by market capitalization. As of June 2022, Apple is the fourth-largest personal computer vendor by unit sales and the second-largest mobile phone manufacturer in the world. It is considered one of the Big Five American information technology companies, alongside Alphabet (parent company of Google), Amazon, Meta Platforms, and Microsoft.
|
interfaces/relation_e.py
CHANGED
|
@@ -21,7 +21,7 @@ Dr. Paul Hammond, a renowned neurologist at Johns Hopkins University, has recent
|
|
| 21 |
|
| 22 |
predictor = GLiNERPredictor( # Predictor manages the model that will be used by tasks
|
| 23 |
GLiNERPredictorConfig(
|
| 24 |
-
model_name = "knowledgator/gliner-multitask-
|
| 25 |
device = "cpu", # Device to use
|
| 26 |
)
|
| 27 |
)
|
|
|
|
| 21 |
|
| 22 |
predictor = GLiNERPredictor( # Predictor manages the model that will be used by tasks
|
| 23 |
GLiNERPredictorConfig(
|
| 24 |
+
model_name = "knowledgator/gliner-multitask-large-v0.5", # Model to use
|
| 25 |
device = "cpu", # Device to use
|
| 26 |
)
|
| 27 |
)
|
interfaces/summarization.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Dict, Union
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
|
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to('cpu')
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
interfaces/universal.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import Dict, Union
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
|
|
|
| 2 |
from gliner import GLiNER
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
model = GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5").to('cpu')
|
| 6 |
|
| 7 |
text1 = """
|
| 8 |
"I recently purchased the Sony WH-1000XM4 Wireless Noise-Canceling Headphones from Amazon and I must say, I'm thoroughly impressed. The package arrived in New York within 2 days, thanks to Amazon Prime's expedited shipping.
|
materials/introduction.html
CHANGED
|
@@ -56,7 +56,7 @@
|
|
| 56 |
<li><b>Open Information Extraction:</b> Extracts pieces of text given an open prompt from a user, for example, product description extraction.</li>
|
| 57 |
</ol>
|
| 58 |
<h3>What is <a href="https://github.com/urchade/GLiNER">GLiNER</a> HandyLab?</h3>
|
| 59 |
-
<p>GLiNER HandyLab serves as a foundational showcase of our technological capabilities within the universal information extraction. It enployes the model <a href="https://huggingface.co/knowledgator/gliner-multitask-
|
| 60 |
<h3>Remember, information extraction is not just about data; it's about insights. Let's uncover those insights together!💫</h3>
|
| 61 |
<!-- Links Section -->
|
| 62 |
<div class="links-container">
|
|
|
|
| 56 |
<li><b>Open Information Extraction:</b> Extracts pieces of text given an open prompt from a user, for example, product description extraction.</li>
|
| 57 |
</ol>
|
| 58 |
<h3>What is <a href="https://github.com/urchade/GLiNER">GLiNER</a> HandyLab?</h3>
|
| 59 |
+
<p>GLiNER HandyLab serves as a foundational showcase of our technological capabilities within the universal information extraction. It enployes the model <a href="https://huggingface.co/knowledgator/gliner-multitask-large-v0.5">"knowledgator/gliner-multitask-large-v0.5"</a>. GLiNER-Multitask is a model designed to extract various pieces of information from plain text based on a user-provided custom prompt. This versatile model leverages a bidirectional transformer encoder, similar to BERT, which ensures both high generalization and compute efficiency despite its compact size.<p>
|
| 60 |
<h3>Remember, information extraction is not just about data; it's about insights. Let's uncover those insights together!💫</h3>
|
| 61 |
<!-- Links Section -->
|
| 62 |
<div class="links-container">
|