Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ from transformers import pipeline
|
|
18 |
# Load model
|
19 |
#model = TFBertForSequenceClassification.from_pretrained('https://huggingface.co/spaces/Kleo/Sarcasm/tree/main')
|
20 |
|
21 |
-
pipeline= pipeline(task="
|
22 |
def check_sarcasm(sentence):
|
23 |
#tf_batch = tokenizer(sentence, max_length=128, padding=True, truncation=True, return_tensors='tf')
|
24 |
#tf_outputs = model(tf_batch.input_ids, tf_batch.token_type_ids)
|
|
|
18 |
# Load model
|
19 |
#model = TFBertForSequenceClassification.from_pretrained('https://huggingface.co/spaces/Kleo/Sarcasm/tree/main')
|
20 |
|
21 |
+
pipeline= pipeline(task="text-classification", model="https://huggingface.co/spaces/Kleo/Sarcasm/blob/main/fine-tuned-bert-gr.h5")
|
22 |
def check_sarcasm(sentence):
|
23 |
#tf_batch = tokenizer(sentence, max_length=128, padding=True, truncation=True, return_tensors='tf')
|
24 |
#tf_outputs = model(tf_batch.input_ids, tf_batch.token_type_ids)
|