Traceback (most recent call last):
File "D:\anaconda\Lib\site-packages\gradio\queueing.py", line 541, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\gradio\route_utils.py", line 276, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\gradio\blocks.py", line 1928, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\gradio\blocks.py", line 1514, in call_function
prediction = await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\anyio_backends_asyncio.py", line 2134, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run
result = context.run(func, args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\gradio\utils.py", line 833, in wrapper
response = f(args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "D:\python\python代码\pythonProject大模型调用\chatbot.py", line 54, in generate_audio
rand_spk = chat.sample_random_speaker()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\ChatTTS\core.py", line 162, in sample_random_speaker
return self._encode_spk_emb(self._sample_random_speaker())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda\Lib\site-packages\ChatTTS\core.py", line 182, in _sample_random_speaker
dim: int = self.gpt.gpt.layers[0].mlp.gate_proj.in_features
^^^^^^^^
AttributeError: 'Chat' object has no attribute 'gpt'
Traceback (most recent call last): File "D:\anaconda\Lib\site-packages\gradio\queueing.py", line 541, in process_events response = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\gradio\route_utils.py", line 276, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\gradio\blocks.py", line 1928, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\gradio\blocks.py", line 1514, in call_function prediction = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\anyio_backends_asyncio.py", line 2134, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\gradio\utils.py", line 833, in wrapper response = f(args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "D:\python\python代码\pythonProject大模型调用\chatbot.py", line 54, in generate_audio rand_spk = chat.sample_random_speaker() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\ChatTTS\core.py", line 162, in sample_random_speaker return self._encode_spk_emb(self._sample_random_speaker()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\ChatTTS\core.py", line 182, in _sample_random_speaker dim: int = self.gpt.gpt.layers[0].mlp.gate_proj.in_features ^^^^^^^^ AttributeError: 'Chat' object has no attribute 'gpt'