PS C:\Users\alexu\Desktop\project> &…
- User
PS C:\Users\alexu\Desktop\project> & C:/Users/alexu/AppData/Local/Programs/Python/Python310/python.exe c:/Users/alexu/Desktop/project/test.py C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components\chatbot.py:237: UserWarning: You have not specified a value for the
typeparameter. Defaulting to the 'tuples' format for chatbot messages, but this is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style dictionaries with 'role' and 'content' keys. warnings.warn( C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\chat_interface.py:226: UserWarning: The gr.ChatInterface was not provided with a type, so the type of the gr.Chatbot, 'tuples', will be used. warnings.warn(- Running on local URL: http://127.0.0.1:7860
To create a public link, set
share=Trueinlaunch(). Traceback (most recent call last): File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\queueing.py", line 624, in process_events response = await route_utils.call_process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\route_utils.py", line 323, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 2043, in process_api result = await self.call_function( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 1590, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\utils.py", line 865, in wrapper response = f(*args, **kwargs) File "c:\Users\alexu\Desktop\project\test.py", line 158, in process_document_with_question response = legal_doc_service.process_document(file.name, question) AttributeError: 'LegalDocumentService' object has no attribute 'process_document' Traceback (most recent call last): File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\queueing.py", line 624, in process_events response = await route_utils.call_process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\route_utils.py", line 323, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 2043, in process_api result = await self.call_function( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 1590, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\utils.py", line 865, in wrapper response = f(*args, **kwargs) File "c:\Users\alexu\Desktop\project\test.py", line 158, in process_document_with_question response = legal_doc_service.process_document(file.name, question) AttributeError: 'LegalDocumentService' object has no attribute 'process_document' Traceback (most recent call last): File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\queueing.py", line 624, in process_events response = await route_utils.call_process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\route_utils.py", line 323, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 2043, in process_api result = await self.call_function( File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\blocks.py", line 1590, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\alexu\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "C:\Users\alexu\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\utils.py", line 865, in wrapper response = f(*args, **kwargs) File "c:\Users\alexu\Desktop\project\test.py", line 165, in generate_document return legal_doc_service.generate_legal_document(prompt) AttributeError: 'LegalDocumentService' object has no attribute 'generate_legal_document' - Assistant