Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ class ONNXInferencePipeline:
|
|
14 |
raise ValueError("HF_TOKEN environment variable is not set.")
|
15 |
|
16 |
# Download files from Hugging Face Hub using the token
|
17 |
-
self.onnx_path = hf_hub_download(repo_id=repo_id, filename="
|
18 |
self.tokenizer_path = hf_hub_download(repo_id=repo_id, filename="train_bpe_tokenizer.json", use_auth_token=hf_token)
|
19 |
self.config_path = hf_hub_download(repo_id=repo_id, filename="hyperparameters.json", use_auth_token=hf_token)
|
20 |
|
@@ -65,7 +65,7 @@ class ONNXInferencePipeline:
|
|
65 |
# Example usage
|
66 |
if __name__ == "__main__":
|
67 |
# Initialize the pipeline with the Hugging Face repository ID
|
68 |
-
pipeline = ONNXInferencePipeline(repo_id="iimran/
|
69 |
|
70 |
# Example texts for testing
|
71 |
example_texts = [
|
|
|
14 |
raise ValueError("HF_TOKEN environment variable is not set.")
|
15 |
|
16 |
# Download files from Hugging Face Hub using the token
|
17 |
+
self.onnx_path = hf_hub_download(repo_id=repo_id, filename="model.onnx", use_auth_token=hf_token)
|
18 |
self.tokenizer_path = hf_hub_download(repo_id=repo_id, filename="train_bpe_tokenizer.json", use_auth_token=hf_token)
|
19 |
self.config_path = hf_hub_download(repo_id=repo_id, filename="hyperparameters.json", use_auth_token=hf_token)
|
20 |
|
|
|
65 |
# Example usage
|
66 |
if __name__ == "__main__":
|
67 |
# Initialize the pipeline with the Hugging Face repository ID
|
68 |
+
pipeline = ONNXInferencePipeline(repo_id="iimran/abuse-detector")
|
69 |
|
70 |
# Example texts for testing
|
71 |
example_texts = [
|