Spaces:
Runtime error
Runtime error
Commit
•
04ca987
1
Parent(s):
8d6db24
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,10 @@ def download_model_NLP():
|
|
12 |
sequence_length=128,)
|
13 |
model = keras_nlp.models.GPT2CausalLM.from_preset(
|
14 |
"gpt2_base_en", preprocessor=preprocessor)
|
|
|
|
|
|
|
|
|
15 |
return model
|
16 |
|
17 |
|
|
|
12 |
sequence_length=128,)
|
13 |
model = keras_nlp.models.GPT2CausalLM.from_preset(
|
14 |
"gpt2_base_en", preprocessor=preprocessor)
|
15 |
+
url = "https://drive.google.com/uc?id=1zi3hSBRTP9uwHDVwQMqpGeXb8RBhJfrO"
|
16 |
+
model_path = gdown.download(url, quiet=False)
|
17 |
+
model.load_weights(model_path)
|
18 |
+
|
19 |
return model
|
20 |
|
21 |
|