Erfan11 commited on
Commit
606a8bd
1 Parent(s): 14a6661

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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, from_tf=True, use_auth_token="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")
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'])