Lexai vovkes222 Claude Opus 4.6 commited on
Commit
4d27736
·
unverified ·
1 Parent(s): 9467432

fix: remove gr.load() proxy, always build local app (#3)

Browse files

gr.load() only accepts HF model/space IDs, not arbitrary URLs.
The chat handler already shows a demo message when API keys are missing.

Co-authored-by: overthelex <mcvovkes@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -274,11 +274,5 @@ def build_app() -> gr.Blocks:
274
 
275
 
276
  if __name__ == "__main__":
277
- is_hf_space = bool(os.environ.get("SPACE_ID"))
278
-
279
- if is_hf_space and not has_api_keys():
280
- demo = gr.load("https://agents.legal.org.ua")
281
- else:
282
- demo = build_app()
283
-
284
  demo.launch()
 
274
 
275
 
276
  if __name__ == "__main__":
277
+ demo = build_app()
 
 
 
 
 
 
278
  demo.launch()