Comments (6)
huggingface的 space 已经停了,api 开销太大了。 本地自己部署是可以跑的,出现这个问题可能是格式上有些问题,你 debug 下就可以
from data-copilot.
@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?
===============================Intent Detecting===========================================
Exception in thread Thread-12:
Traceback (most recent call last):
File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/xxx/Data-Copilot/main.py", line 37, in run
self.result = self.func(*self.args)
File "/xxx/Data-Copilot/main.py", line 135, in run
prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
TypeError: can only concatenate str (not "function") to str
Traceback (most recent call last):
File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function
prediction = await utils.async_iteration(iterator)
File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration
return await iterator.__anext__()
File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__
return await anyio.to_thread.run_sync(
File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async
return next(iterator)
File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper
yield from f(*args, **kwargs)
File "/xxx/Data-Copilot/app.py", line 168, in run
for solving_step, img, res, df in generator:
File "/xxx/Data-Copilot/app.py", line 64, in run
yield next(gen)
File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface
finally_text, img, output, df = thread.get_result()
File "/xxx/Data-Copilot/main.py", line 40, in get_result
return self.result
AttributeError: 'MyThread' object has no attribute 'result'```
from data-copilot.
@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?
===============================Intent Detecting=========================================== Exception in thread Thread-12: Traceback (most recent call last): File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/xxx/Data-Copilot/main.py", line 37, in run self.result = self.func(*self.args) File "/xxx/Data-Copilot/main.py", line 135, in run prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: ' TypeError: can only concatenate str (not "function") to str Traceback (most recent call last): File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api result = await self.call_function( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function prediction = await utils.async_iteration(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration return await iterator.__anext__() File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__ return await anyio.to_thread.run_sync( File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async return next(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper yield from f(*args, **kwargs) File "/xxx/Data-Copilot/app.py", line 168, in run for solving_step, img, res, df in generator: File "/xxx/Data-Copilot/app.py", line 64, in run yield next(gen) File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface finally_text, img, output, df = thread.get_result() File "/xxx/Data-Copilot/main.py", line 40, in get_result return self.result AttributeError: 'MyThread' object has no attribute 'result'```
看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下
from data-copilot.
@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?
===============================Intent Detecting=========================================== Exception in thread Thread-12: Traceback (most recent call last): File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/xxx/Data-Copilot/main.py", line 37, in run self.result = self.func(*self.args) File "/xxx/Data-Copilot/main.py", line 135, in run prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: ' TypeError: can only concatenate str (not "function") to str Traceback (most recent call last): File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api result = await self.call_function( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function prediction = await utils.async_iteration(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration return await iterator.__anext__() File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__ return await anyio.to_thread.run_sync( File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async return next(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper yield from f(*args, **kwargs) File "/xxx/Data-Copilot/app.py", line 168, in run for solving_step, img, res, df in generator: File "/xxx/Data-Copilot/app.py", line 64, in run yield next(gen) File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface finally_text, img, output, df = thread.get_result() File "/xxx/Data-Copilot/main.py", line 40, in get_result return self.result AttributeError: 'MyThread' object has no attribute 'result'```看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下
main.py L135
prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '
@zwq2018 请教一下,这句代码是在做什么操作?
这句代码得到了以下的错误:
TypeError: can only concatenate str (not "function") to str
from data-copilot.
就是把今天的时间 到 prompt 里吧 你debug 下哪个不是 str
from data-copilot.
@zwq2018 @ET-yzk 我是本地运行app.py,报上面这个错误,请问是什么原因导致的?
===============================Intent Detecting=========================================== Exception in thread Thread-12: Traceback (most recent call last): File "/xxx/miniconda3/envs/data_copilot/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/xxx/Data-Copilot/main.py", line 37, in run self.result = self.func(*self.args) File "/xxx/Data-Copilot/main.py", line 135, in run prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: ' TypeError: can only concatenate str (not "function") to str Traceback (most recent call last): File "/xxx/.local/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api result = await self.call_function( File "/xxx/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1117, in call_function prediction = await utils.async_iteration(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 350, in async_iteration return await iterator.__anext__() File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 343, in __anext__ return await anyio.to_thread.run_sync( File "/xxx/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/xxx/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 326, in run_sync_iterator_async return next(iterator) File "/xxx/.local/lib/python3.10/site-packages/gradio/utils.py", line 695, in gen_wrapper yield from f(*args, **kwargs) File "/xxx/Data-Copilot/app.py", line 168, in run for solving_step, img, res, df in generator: File "/xxx/Data-Copilot/app.py", line 64, in run yield next(gen) File "/xxx/Data-Copilot/main.py", line 378, in gradio_interface finally_text, img, output, df = thread.get_result() File "/xxx/Data-Copilot/main.py", line 40, in get_result return self.result AttributeError: 'MyThread' object has no attribute 'result'```看上去应该是因为 gpt 版本版本变化导致了输出格式没解析出来 ,具体可能需要debug下
main.py L135 prompt_intent_detection = prompt_intent_detection + '\n\n' + 'Instruction:' + '今天的日期是'+ formatted_time +', '+ instruction + ' ###New Instruction: '@zwq2018 请教一下,这句代码是在做什么操作? 这句代码得到了以下的错误:
TypeError: can only concatenate str (not "function") to str
可以看看论文 。里面介绍的比较清楚
from data-copilot.
Related Issues (20)
- 请问可以链接到开源模型吗 HOT 1
- How to create new tools(functions) HOT 4
- 能否连接本地数据 HOT 2
- How is this different from openai's function call HOT 2
- 未响应 HOT 2
- 报错:KeyError: 'arg' HOT 1
- 图像显示不出来 HOT 4
- 自己定义函数,让llm选择是这样吗? HOT 6
- 用Langchain的agent可以实现类似的流程吗? HOT 1
- 怎么修改azure调用改为one api呢
- TuShare 的token,账户积分不够 大家都怎么解决的哈? HOT 2
- app 启动输入问题后报错截图如下 HOT 8
- 您好,在论文中提到,使用gpt-4 对接口设计,请问这块如何使用gpt实现的呢? HOT 2
- 请问模型设计的接口代码是如何实现的?我应当如何让项目调取本地数据? HOT 3
- 本地方式启动解码报错 HOT 3
- 请教一下gradio的版本是多少呀 requeirment里面没有
- 在哪里替换openi的api-key呀 HOT 1
- 用哪个版本的python? HOT 2
- 咨询下企业内部数据报表分析工具的思路
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-copilot.