girish00 commited on
Commit
48ea9da
·
verified ·
1 Parent(s): ec50606

make project runnable and endpoint-ready

Browse files
Files changed (1) hide show
  1. infer_cloud.py +5 -4
infer_cloud.py CHANGED
@@ -216,16 +216,17 @@ def main():
216
  if __name__ == "__main__":
217
  try:
218
  main()
219
- except RuntimeError as exc:
220
  print(
221
  json.dumps(
222
  {
223
- "error": "Hugging Face cloud inference is unavailable for this model repo.",
224
  "reason": str(exc),
225
  "cloud_available": False,
226
  "hint": (
227
- "Use the default local fallback, deploy a Hugging Face Dedicated "
228
- "Inference Endpoint, or run the model on a cloud VM."
 
229
  ),
230
  },
231
  indent=2,
 
216
  if __name__ == "__main__":
217
  try:
218
  main()
219
+ except (RuntimeError, ValueError) as exc:
220
  print(
221
  json.dumps(
222
  {
223
+ "error": "Cloud inference request failed.",
224
  "reason": str(exc),
225
  "cloud_available": False,
226
  "hint": (
227
+ "Pass --repo-id for development fallback mode, or pass "
228
+ "--endpoint-url for a deployed Hugging Face Dedicated "
229
+ "Inference Endpoint."
230
  ),
231
  },
232
  indent=2,