Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'ConversationBot' object has no attribute 'agent' #461

Open
MZerg opened this issue Nov 20, 2023 · 0 comments
Open

AttributeError: 'ConversationBot' object has no attribute 'agent' #461

MZerg opened this issue Nov 20, 2023 · 0 comments

Comments

@MZerg
Copy link

MZerg commented Nov 20, 2023

python visual_chatgpt.py --load ImageCaptioning_cpu,Text2Image_cpu /root/anaconda3/envs/visgpt/lib/python3.8/site-packages/groundingdino/models/GroundingDINO/ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only! warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!") Initializing VisualChatGPT, load_dict={'ImageCaptioning': 'cpu', 'Text2Image': 'cpu'} Initializing ImageCaptioning to cpu Initializing Text2Image to cpu Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s]text_config_dictis provided which will be used to initializeCLIPTextConfig. The value text_config["id2label"]will be overriden.text_config_dictis provided which will be used to initializeCLIPTextConfig. The value text_config["bos_token_id"]will be overriden.text_config_dictis provided which will be used to initializeCLIPTextConfig. The value text_config["eos_token_id"]will be overriden. Loading pipeline components...: 100%|███████████████████████████| 7/7 [00:00<00:00, 11.84it/s] All the Available Functions: {'ImageCaptioning': <__main__.ImageCaptioning object at 0x7fdbfcad6760>, 'Text2Image': <__main__.Text2Image object at 0x7fdbfcad6730>} visual_chatgpt.py:1585: GradioDeprecationWarning: 'scale' value should be an integer. Using 0.7 will cause issues. with gr.Column(scale=0.7): visual_chatgpt.py:1586: GradioDeprecationWarning: Thestyle` method is deprecated. Please set these arguments in the constructor instead.
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(
visual_chatgpt.py:1588: GradioDeprecationWarning: 'scale' value should be an integer. Using 0.15 will cause issues.
with gr.Column(scale=0.15, min_width=0):
visual_chatgpt.py:1590: GradioDeprecationWarning: 'scale' value should be an integer. Using 0.15 will cause issues.
with gr.Column(scale=0.15, min_width=0):
Running on local URL: http://0.0.0.0:5050

To create a public link, set share=True in launch().
Traceback (most recent call last):
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/gradio/routes.py", line 534, in predict
output = await route_utils.call_process_api(
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/gradio/blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/root/anaconda3/envs/visgpt/lib/python3.8/site-packages/gradio/utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "visual_chatgpt.py", line 1536, in run_text
self.agent.memory.buffer = cut_dialogue_history(self.agent.memory.buffer, keep_last_n_words=500)
AttributeError: 'ConversationBot' object has no attribute 'agent'
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant