Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ load_dotenv()
|
|
| 9 |
|
| 10 |
app = Flask(__name__)
|
| 11 |
|
| 12 |
-
# Load Salesforce credentials from .env file
|
| 13 |
SF_USERNAME = os.getenv("smart.scorer@sathkrutha.com")
|
| 14 |
SF_PASSWORD = os.getenv("Vendor@1234")
|
| 15 |
SF_SECURITY_TOKEN = os.getenv("XcBErW59i7jONEwwjNTXMlIKO")
|
|
@@ -17,9 +17,6 @@ SF_SECURITY_TOKEN = os.getenv("XcBErW59i7jONEwwjNTXMlIKO")
|
|
| 17 |
# Authenticate with Salesforce
|
| 18 |
sf = Salesforce(username=SF_USERNAME, password=SF_PASSWORD, security_token=SF_SECURITY_TOKEN)
|
| 19 |
|
| 20 |
-
# Load Hugging Face API token if required
|
| 21 |
-
HUGGINGFACE_API_TOKEN = os.getenv("HUGGINGFACE_API_TOKEN")
|
| 22 |
-
|
| 23 |
# Load the pre-trained BERT model for NER (you can fine-tune this if needed)
|
| 24 |
tokenizer = BertTokenizerFast.from_pretrained('bert-base-uncased')
|
| 25 |
model = BertForTokenClassification.from_pretrained('bert-base-uncased')
|
|
|
|
| 9 |
|
| 10 |
app = Flask(__name__)
|
| 11 |
|
| 12 |
+
# Load Salesforce credentials from .env file using os.getenv()
|
| 13 |
SF_USERNAME = os.getenv("smart.scorer@sathkrutha.com")
|
| 14 |
SF_PASSWORD = os.getenv("Vendor@1234")
|
| 15 |
SF_SECURITY_TOKEN = os.getenv("XcBErW59i7jONEwwjNTXMlIKO")
|
|
|
|
| 17 |
# Authenticate with Salesforce
|
| 18 |
sf = Salesforce(username=SF_USERNAME, password=SF_PASSWORD, security_token=SF_SECURITY_TOKEN)
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
# Load the pre-trained BERT model for NER (you can fine-tune this if needed)
|
| 21 |
tokenizer = BertTokenizerFast.from_pretrained('bert-base-uncased')
|
| 22 |
model = BertForTokenClassification.from_pretrained('bert-base-uncased')
|