Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
10 |
|
11 |
# Load the tokenizer and model
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Abdulmohsena/Faseeh")
|
13 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("Abdulmohsena/Faseeh").to(device)
|
14 |
|
15 |
def translate(text, temperature=0.1, tries=1):
|
16 |
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=256).to(device)
|
|
|
10 |
|
11 |
# Load the tokenizer and model
|
12 |
tokenizer = AutoTokenizer.from_pretrained("Abdulmohsena/Faseeh")
|
13 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("Abdulmohsena/Faseeh", revision="03226648afb02523acacfe8af1363cc5ddd9e795").to(device)
|
14 |
|
15 |
def translate(text, temperature=0.1, tries=1):
|
16 |
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True, max_length=256).to(device)
|