Update app.py
Browse files
app.py
CHANGED
@@ -16,14 +16,14 @@ local_path = "hf_model"
|
|
16 |
model_version = "v1687590401"
|
17 |
model_repo_id = "chansung/kerasnlp-gpt2-alpaca-pipeline"
|
18 |
model_repo_url = f"https://huggingface.co/{model_repo_id}"
|
19 |
-
|
20 |
def _clone_and_checkout(repo_url: str, local_path: str, version: str) -> Repository:
|
21 |
repository = Repository(
|
22 |
local_dir=local_path, clone_from=repo_url
|
23 |
)
|
24 |
repository.git_checkout(revision=version)
|
25 |
return repository
|
26 |
-
|
27 |
# _ = _clone_and_checkout(model_repo_url, local_path, model_version)
|
28 |
# model = tf.saved_model.load(local_path, tags=[tag_constants.SERVING])
|
29 |
# gpt_lm_predict_fn = model.signatures["serving_default"]
|
|
|
16 |
model_version = "v1687590401"
|
17 |
model_repo_id = "chansung/kerasnlp-gpt2-alpaca-pipeline"
|
18 |
model_repo_url = f"https://huggingface.co/{model_repo_id}"
|
19 |
+
|
20 |
def _clone_and_checkout(repo_url: str, local_path: str, version: str) -> Repository:
|
21 |
repository = Repository(
|
22 |
local_dir=local_path, clone_from=repo_url
|
23 |
)
|
24 |
repository.git_checkout(revision=version)
|
25 |
return repository
|
26 |
+
|
27 |
# _ = _clone_and_checkout(model_repo_url, local_path, model_version)
|
28 |
# model = tf.saved_model.load(local_path, tags=[tag_constants.SERVING])
|
29 |
# gpt_lm_predict_fn = model.signatures["serving_default"]
|