Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
535ad64
1
Parent(s):
c013dd5
Removed CNN
Browse files- app.py +1 -3
- models/cnn.py +0 -2
app.py
CHANGED
|
@@ -61,8 +61,6 @@ def format_as_markdown(predictions: dict) -> str:
|
|
| 61 |
def classify_text(classifier, text, threshold, output_format):
|
| 62 |
if classifier == 'Transformer':
|
| 63 |
tags = get_tags_bert(bert, text, threshold)
|
| 64 |
-
elif classifier == 'CNN':
|
| 65 |
-
tags = []
|
| 66 |
elif classifier == 'LSTM':
|
| 67 |
tags = get_tags_lstm(lstm, text, threshold)
|
| 68 |
else:
|
|
@@ -89,7 +87,7 @@ with gr.Blocks(theme="default") as demo:
|
|
| 89 |
# Left column — Input
|
| 90 |
with gr.Column(scale=1):
|
| 91 |
classifier = gr.Radio(
|
| 92 |
-
["Naïve Bayes", "
|
| 93 |
value="Transformer",
|
| 94 |
label="Processing model",
|
| 95 |
info="Choose which model to use to process texts",
|
|
|
|
| 61 |
def classify_text(classifier, text, threshold, output_format):
|
| 62 |
if classifier == 'Transformer':
|
| 63 |
tags = get_tags_bert(bert, text, threshold)
|
|
|
|
|
|
|
| 64 |
elif classifier == 'LSTM':
|
| 65 |
tags = get_tags_lstm(lstm, text, threshold)
|
| 66 |
else:
|
|
|
|
| 87 |
# Left column — Input
|
| 88 |
with gr.Column(scale=1):
|
| 89 |
classifier = gr.Radio(
|
| 90 |
+
["Naïve Bayes", "LSTM", "Transformer"],
|
| 91 |
value="Transformer",
|
| 92 |
label="Processing model",
|
| 93 |
info="Choose which model to use to process texts",
|
models/cnn.py
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
def get_tags_cnn(model, text, threshold=0.5):
|
| 2 |
-
return []
|
|
|
|
|
|
|
|
|