Fetching Space from: https://huggingface.co/spaces/gradio/chatinterface_streaming_echo
Loaded as API: https://gradio-chatinterface-streaming-echo.hf.space ✔
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[3], line 1
----> 1 gr.load("gradio/chatinterface_streaming_echo", src="spaces")
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:72, in load(name, src, hf_token, alias, kwargs)
48 @document()
49 def load(
50 name: str,
(...)
54 kwargs,
55 ) -> Blocks:
56 """
57 Method that constructs a Blocks from a Hugging Face repo. Can accept
58 model repos (if src is "models") or Space repos (if src is "spaces"). The input
(...)
70 demo.launch()
71 """
---> 72 return load_blocks_from_repo(
73 name=name, src=src, hf_token=hf_token, alias=alias, **kwargs
74 )
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:111, in load_blocks_from_repo(name, src, hf_token, alias, kwargs)
106 warnings.warn(
107 """You are loading a model/Space with a different access token than the one you used to load a previous model/Space. This is not recommended, as it may cause unexpected behavior."""
108 )
109 Context.hf_token = hf_token
--> 111 blocks: gradio.Blocks = factory_methods[src](name, hf_token, alias, kwargs)
112 return blocks
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:527, in from_spaces(space_name, hf_token, alias, **kwargs)
520 if kwargs:
521 warnings.warn(
522 "You cannot override parameters for this Space by passing in kwargs. "
523 "Instead, please load the Space as a function and use it to create a "
524 "Blocks or Interface locally. You may find this Guide helpful: "
525 "https://gradio.app/using_blocks_like_functions/"
526 )
--> 527 return from_spaces_blocks(space=space_name, hf_token=hf_token)
Describe the bug
I can't load the following two chatbot demos in the gradio org. The cause is different for each once. Might be fixed by #7350 but just noting here.
gr.load("gradio/chatinterface_streaming_echo", src="spaces")
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:72, in load(name, src, hf_token, alias, kwargs) 48 @document() 49 def load( 50 name: str, (...) 54 kwargs, 55 ) -> Blocks: 56 """ 57 Method that constructs a Blocks from a Hugging Face repo. Can accept 58 model repos (if src is "models") or Space repos (if src is "spaces"). The input (...) 70 demo.launch() 71 """ ---> 72 return load_blocks_from_repo( 73 name=name, src=src, hf_token=hf_token, alias=alias, **kwargs 74 )
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:111, in load_blocks_from_repo(name, src, hf_token, alias, kwargs) 106 warnings.warn( 107 """You are loading a model/Space with a different access token than the one you used to load a previous model/Space. This is not recommended, as it may cause unexpected behavior.""" 108 ) 109 Context.hf_token = hf_token --> 111 blocks: gradio.Blocks = factory_methods[src](name, hf_token, alias, kwargs) 112 return blocks
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:527, in from_spaces(space_name, hf_token, alias, **kwargs) 520 if kwargs: 521 warnings.warn( 522 "You cannot override parameters for this Space by passing in kwargs. " 523 "Instead, please load the Space as a function and use it to create a " 524 "Blocks or Interface locally. You may find this Guide helpful: " 525 "https://gradio.app/using_blocks_like_functions/" 526 ) --> 527 return from_spaces_blocks(space=space_name, hf_token=hf_token)
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/external.py:546, in from_spaces_blocks(space, hf_token) 544 else: 545 predict_fns.append(None) --> 546 return gradio.Blocks.from_config(client.config, predict_fns, client.src)
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/blocks.py:731, in Blocks.from_config(cls, config, fns, proxy_url) 729 _targets = dependency.pop("targets") 730 trigger = dependency.pop("trigger", None) --> 731 targets = [ 732 getattr( 733 original_mapping[ 734 target if isinstance(target, int) else target[0] 735 ], 736 trigger if isinstance(target, int) else target[1], 737 ) 738 for target in _targets 739 ] 740 dependency.pop("backend_fn") 741 dependency.pop("documentation", None)
File ~/miniconda3/envs/dotenv-dev/lib/python3.10/site-packages/gradio/blocks.py:733, in(.0)
729 _targets = dependency.pop("targets")
730 trigger = dependency.pop("trigger", None)
731 targets = [
732 getattr(
--> 733 original_mapping[
734 target if isinstance(target, int) else target[0]
735 ],
736 trigger if isinstance(target, int) else target[1],
737 )
738 for target in _targets
739 ]
740 dependency.pop("backend_fn")
741 dependency.pop("documentation", None)
KeyError: None
Fetching Space from: https://huggingface.co/spaces/gradio/chatbot_multimodal Loaded as API: https://gradio-chatbot-multimodal.hf.space ✔
FileNotFoundError Traceback (most recent call last)