Spaces:
Runtime error
Runtime error
Alberto Carmona
commited on
Commit
·
80d9102
1
Parent(s):
057f5f4
Stop loading the model until space upgrade with GPU
Browse files- functions.py +4 -1
functions.py
CHANGED
|
@@ -22,6 +22,9 @@ def extract_text(url: str):
|
|
| 22 |
|
| 23 |
|
| 24 |
def summarize_text(text: str):
|
|
|
|
|
|
|
|
|
|
| 25 |
print(['summarize_text', 'start'])
|
| 26 |
input_text = f'<s>Instruction: Elabora un resume del siguiente texto.\nInput: {text}\nOutput: '
|
| 27 |
batch = tokenizer(input_text, return_tensors='pt')
|
|
@@ -50,4 +53,4 @@ def load_model(peft_model_id):
|
|
| 50 |
return model, tokenizer
|
| 51 |
|
| 52 |
|
| 53 |
-
model, tokenizer = load_model("milyiyo/opt-6.7b-lora-sag-t3000-v300-v2")
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
def summarize_text(text: str):
|
| 25 |
+
# Pending to load the model first
|
| 26 |
+
return ''
|
| 27 |
+
|
| 28 |
print(['summarize_text', 'start'])
|
| 29 |
input_text = f'<s>Instruction: Elabora un resume del siguiente texto.\nInput: {text}\nOutput: '
|
| 30 |
batch = tokenizer(input_text, return_tensors='pt')
|
|
|
|
| 53 |
return model, tokenizer
|
| 54 |
|
| 55 |
|
| 56 |
+
# model, tokenizer = load_model("milyiyo/opt-6.7b-lora-sag-t3000-v300-v2")
|