Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,14 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
| 3 |
import torch
|
| 4 |
from sentence_transformers import SentenceTransformer, models
|
| 5 |
param_max_length=256
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Define a function that takes a text input and returns the result
|
| 8 |
def analyze_text(input):
|
| 9 |
# Your processing or model inference code here
|
|
|
|
| 3 |
import torch
|
| 4 |
from sentence_transformers import SentenceTransformer, models
|
| 5 |
param_max_length=256
|
| 6 |
+
import requests
|
| 7 |
|
| 8 |
+
file_url = "https://drive.google.com/file/d/1KaFaeoMAkRcJdhXe77ibmwqz6pseAqkj/view?usp=drive_link"
|
| 9 |
+
response = requests.get(file_url)
|
| 10 |
+
|
| 11 |
+
with open("model_weights.pth", "wb") as f:
|
| 12 |
+
f.write(response.content)
|
| 13 |
+
|
| 14 |
# Define a function that takes a text input and returns the result
|
| 15 |
def analyze_text(input):
|
| 16 |
# Your processing or model inference code here
|