Access chat app in another app

Hello team , I have created an sample private space using the gradio temple for chatbot (no change done), that space is working fine .

I am trying to access it and display it in another public space but it gives an error like below

This is the error in app where I am trying to access
raise AppError(
gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: ‘NoneType’ object is not subscriptable

This is the message in the chatbot app
message_serialized, history = self._process_msg_and_trim_history(
File “/usr/local/lib/python3.10/site-packages/gradio/chat_interface.py”, line 605, in _process_msg_and_trim_history
history = history_with_input[:-1]
TypeError: ‘NoneType’ object is not subscriptable

Code for chatbot app -default code from template for gradio

Code for app which is trying to access

import os
import gradio as gr
from huggingface_hub import login

Authenticate with Hugging Face

HF_TOKEN = os.getenv(“HF_TOKEN”) # Set your Hugging Face token in the environment
login(token=HF_TOKEN) # Authenticate using the token

Load the private Space (replace with the correct Space ID)

with gr.Blocks() as demo:
gr.load(“xxx/privateapp”,token=HF_TOKEN, src=“spaces”)

demo.launch(show_error=True)

I have also tried making private app public but still the same error

You can also try this and it’s very easy to replicate

Any help here would really help me
Thank you

1 Like

Loading from outside the private Gradio space will not succeed in most cases. I still don’t know whether this is a bug or a feature…:thinking:

Well I have also tried to access by making it public, it’s the issue with the default chatbot app as I also tried other simpler apps they work fine

1 Like

Oh, I see, it’s a Gradio bug…
There’s no such thing as a bug-free Gradio. There must be aliens inside.:roll_eyes:
There are too many issues, so it’s impossible to tell whether there’s already something that matches…