Spaces:
Runtime error
Runtime error
fix: print the current model
Browse files
app.py
CHANGED
@@ -114,6 +114,7 @@ MODEL_REPO_URL = f"https://huggingface.co/{MODEL_NAME}"
|
|
114 |
if len(ENDPOINT)>0:
|
115 |
API_URL = f"{ENDPOINT}" #/revision/{REVISION}" if len(REVISION)>0 else f"{ENDPOINT}"
|
116 |
MODEL_VERSION = f"{ENDPOINT}" if len(REVISION)==0 else REVISION
|
|
|
117 |
else:
|
118 |
API_URL = f"https://api-inference.huggingface.co/models/{MODEL_NAME}/revision/{REVISION}" if len(REVISION)>0 else f"https://api-inference.huggingface.co/models/{MODEL_NAME}"
|
119 |
model_repo = Repository(local_dir="model",
|
@@ -123,8 +124,9 @@ else:
|
|
123 |
git_user="vpcom",
|
124 |
revision=REVISION)
|
125 |
MODEL_VERSION = model_repo.git_head_commit_url() if len(REVISION)==0 else REVISION
|
|
|
126 |
|
127 |
-
print(f'Model Version: {MODEL_VERSION}')
|
128 |
|
129 |
DATA_FILENAME = "data.jsonl"
|
130 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|
|
|
114 |
if len(ENDPOINT)>0:
|
115 |
API_URL = f"{ENDPOINT}" #/revision/{REVISION}" if len(REVISION)>0 else f"{ENDPOINT}"
|
116 |
MODEL_VERSION = f"{ENDPOINT}" if len(REVISION)==0 else REVISION
|
117 |
+
print(f'ENDPOINT: {ENDPOINT}')
|
118 |
else:
|
119 |
API_URL = f"https://api-inference.huggingface.co/models/{MODEL_NAME}/revision/{REVISION}" if len(REVISION)>0 else f"https://api-inference.huggingface.co/models/{MODEL_NAME}"
|
120 |
model_repo = Repository(local_dir="model",
|
|
|
124 |
git_user="vpcom",
|
125 |
revision=REVISION)
|
126 |
MODEL_VERSION = model_repo.git_head_commit_url() if len(REVISION)==0 else REVISION
|
127 |
+
print(f'API URL: {API_URL}')
|
128 |
|
129 |
+
#print(f'Model Version: {MODEL_VERSION}')
|
130 |
|
131 |
DATA_FILENAME = "data.jsonl"
|
132 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|