Update app.py
Browse files
app.py
CHANGED
|
@@ -12,15 +12,15 @@ import matplotlib.pyplot as plt
|
|
| 12 |
import pandas as pd
|
| 13 |
from sklearn.manifold import TSNE
|
| 14 |
|
| 15 |
-
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|
| 17 |
base_model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|
| 18 |
|
| 19 |
-
|
| 20 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 21 |
base_model.to(device)
|
| 22 |
|
| 23 |
-
|
| 24 |
class ProjectionHead(nn.Module):
|
| 25 |
def __init__(self, input_dim=384, hidden_dim=128, output_dim=384):
|
| 26 |
super().__init__()
|
|
@@ -64,7 +64,7 @@ class ConceptHierarchy:
|
|
| 64 |
|
| 65 |
concept_hierarchy = ConceptHierarchy()
|
| 66 |
|
| 67 |
-
|
| 68 |
class CognitiveMemory:
|
| 69 |
def __init__(self, max_length=100):
|
| 70 |
self.samples = deque(maxlen=max_length)
|
|
@@ -353,7 +353,7 @@ def train_sample(text, label):
|
|
| 353 |
|
| 354 |
# Gradio UI
|
| 355 |
with gr.Blocks() as app:
|
| 356 |
-
gr.Markdown("#
|
| 357 |
gr.Markdown("### This system features meta-learning, active learning, uncertainty quantification, and concept drift detection")
|
| 358 |
|
| 359 |
with gr.Row():
|
|
|
|
| 12 |
import pandas as pd
|
| 13 |
from sklearn.manifold import TSNE
|
| 14 |
|
| 15 |
+
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|
| 17 |
base_model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|
| 18 |
|
| 19 |
+
|
| 20 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 21 |
base_model.to(device)
|
| 22 |
|
| 23 |
+
|
| 24 |
class ProjectionHead(nn.Module):
|
| 25 |
def __init__(self, input_dim=384, hidden_dim=128, output_dim=384):
|
| 26 |
super().__init__()
|
|
|
|
| 64 |
|
| 65 |
concept_hierarchy = ConceptHierarchy()
|
| 66 |
|
| 67 |
+
|
| 68 |
class CognitiveMemory:
|
| 69 |
def __init__(self, max_length=100):
|
| 70 |
self.samples = deque(maxlen=max_length)
|
|
|
|
| 353 |
|
| 354 |
# Gradio UI
|
| 355 |
with gr.Blocks() as app:
|
| 356 |
+
gr.Markdown("# Vers3Dynamics Labeling System")
|
| 357 |
gr.Markdown("### This system features meta-learning, active learning, uncertainty quantification, and concept drift detection")
|
| 358 |
|
| 359 |
with gr.Row():
|