Spaces:
Sleeping
Sleeping
Update app.py
Browse filesfixed import statements for Render
app.py
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
-
import pandas as pd
|
| 2 |
import dash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
from dash import dcc, html
|
| 4 |
from dash.dash_table import DataTable
|
| 5 |
from dash.dependencies import Output, Input, State
|
| 6 |
import plotly.express as px
|
| 7 |
-
import dash_bootstrap_components as dbc
|
| 8 |
import spacy
|
| 9 |
from sentence_transformers import SentenceTransformer
|
| 10 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 11 |
from gliner_spacy.pipeline import GlinerSpacy
|
| 12 |
import warnings
|
| 13 |
import threading
|
| 14 |
-
|
| 15 |
warnings.filterwarnings("ignore", message="The sentencepiece tokenizer")
|
| 16 |
|
| 17 |
-
# Initialize Dash app with Bootstrap theme and Font Awesome
|
| 18 |
-
external_stylesheets = [dbc.themes.DARKLY, 'https://use.fontawesome.com/releases/v5.8.1/css/all.css']
|
| 19 |
-
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
|
| 20 |
-
|
| 21 |
-
server = app.server
|
| 22 |
-
|
| 23 |
# Configuration for GLiNER integration
|
| 24 |
custom_spacy_config = {
|
| 25 |
"gliner_model": "urchade/gliner_small-v2.1",
|
|
|
|
|
|
|
| 1 |
import dash
|
| 2 |
+
import dash_bootstrap_components as dbc
|
| 3 |
+
|
| 4 |
+
# Initialize Dash app with Bootstrap theme and Font Awesome
|
| 5 |
+
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY, 'https://use.fontawesome.com/releases/v5.8.1/css/all.css'])
|
| 6 |
+
|
| 7 |
+
# Create server variable
|
| 8 |
+
server = app.server
|
| 9 |
+
|
| 10 |
+
import pandas as pd
|
| 11 |
from dash import dcc, html
|
| 12 |
from dash.dash_table import DataTable
|
| 13 |
from dash.dependencies import Output, Input, State
|
| 14 |
import plotly.express as px
|
|
|
|
| 15 |
import spacy
|
| 16 |
from sentence_transformers import SentenceTransformer
|
| 17 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 18 |
from gliner_spacy.pipeline import GlinerSpacy
|
| 19 |
import warnings
|
| 20 |
import threading
|
|
|
|
| 21 |
warnings.filterwarnings("ignore", message="The sentencepiece tokenizer")
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
# Configuration for GLiNER integration
|
| 24 |
custom_spacy_config = {
|
| 25 |
"gliner_model": "urchade/gliner_small-v2.1",
|