Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
from transformers import TFBertForSequenceClassification, BertTokenizer
|
2 |
from flask import Flask, request, jsonify
|
3 |
-
import os
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
# Load model and tokenizer from Hugging Face Hub
|
8 |
model_name = "Erfan11/Neuracraft"
|
9 |
-
model = TFBertForSequenceClassification.from_pretrained(model_name,
|
10 |
tokenizer = BertTokenizer.from_pretrained(model_name, use_auth_token="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")
|
11 |
|
12 |
@app.route('/predict', methods=['POST'])
|
|
|
1 |
from transformers import TFBertForSequenceClassification, BertTokenizer
|
2 |
from flask import Flask, request, jsonify
|
|
|
3 |
|
4 |
app = Flask(__name__)
|
5 |
|
6 |
# Load model and tokenizer from Hugging Face Hub
|
7 |
model_name = "Erfan11/Neuracraft"
|
8 |
+
model = TFBertForSequenceClassification.from_pretrained(model_name, use_auth_token="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")
|
9 |
tokenizer = BertTokenizer.from_pretrained(model_name, use_auth_token="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")
|
10 |
|
11 |
@app.route('/predict', methods=['POST'])
|