Spaces:
Sleeping
Sleeping
sami606713
commited on
Commit
•
8ebc6c3
1
Parent(s):
8ba7dca
Update utils.py
Browse files
utils.py
CHANGED
@@ -23,10 +23,10 @@ def load_model():
|
|
23 |
return None
|
24 |
def model_prediction(text):
|
25 |
tokenizer=load_tokenizer()
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
32 |
-
return corrected_text
|
|
|
23 |
return None
|
24 |
def model_prediction(text):
|
25 |
tokenizer=load_tokenizer()
|
26 |
+
print(tokenizer)
|
27 |
+
# input_ids = tokenizer.encode(text, return_tensors='pt') # Move input_ids to the GPU
|
28 |
|
29 |
+
# model=load_model()
|
30 |
+
# outputs = model.generate(input_ids, max_length=128)
|
31 |
+
# corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
32 |
+
# return corrected_text
|
|
|
|