Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,10 +31,8 @@ AVAILABLE_MODELS = {
|
|
| 31 |
"bloomz-560m": "bigscience/bloomz-560m",
|
| 32 |
"opt-350m": "facebook/opt-350m",
|
| 33 |
"pythia-160m": "EleutherAI/pythia-160m",
|
| 34 |
-
"
|
| 35 |
-
"
|
| 36 |
-
"llama": "meta-llama/Llama-3.2-1B",
|
| 37 |
-
"eulether": "EleutherAI/gpt-j-6b"
|
| 38 |
}
|
| 39 |
|
| 40 |
# Initialize model and tokenizer
|
|
@@ -52,7 +50,7 @@ def load_model(model_name):
|
|
| 52 |
current_model_name = model_name
|
| 53 |
|
| 54 |
# Load the default model at startup
|
| 55 |
-
load_model("
|
| 56 |
|
| 57 |
@spaces.GPU()
|
| 58 |
def get_next_token_predictions(text, model_name, top_k=10):
|
|
|
|
| 31 |
"bloomz-560m": "bigscience/bloomz-560m",
|
| 32 |
"opt-350m": "facebook/opt-350m",
|
| 33 |
"pythia-160m": "EleutherAI/pythia-160m",
|
| 34 |
+
"eulether": "EleutherAI/gpt-j-6b",
|
| 35 |
+
"gpt2-large": "gpt2-large",
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
# Initialize model and tokenizer
|
|
|
|
| 50 |
current_model_name = model_name
|
| 51 |
|
| 52 |
# Load the default model at startup
|
| 53 |
+
load_model("gpt2-large")
|
| 54 |
|
| 55 |
@spaces.GPU()
|
| 56 |
def get_next_token_predictions(text, model_name, top_k=10):
|