leptonai / search_with_lepton

Building a quick conversation-based search demo with Lepton AI.
https://search.lepton.run
Apache License 2.0
7.7k stars 978 forks source link

几个问题!huggingface要代理。local执行有bug #69

Open makelove opened 5 months ago

makelove commented 5 months ago

按照https://www.lepton.ai/docs/overview/quickstart 执行

Traceback (most recent call last): File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/cli/photon.py", line 785, in run photon.launch(port=port) File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/photon.py", line 897, in launch self._call_init_once() File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/photon.py", line 614, in _call_init_once self._init_res = self.init() File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 254, in init self.pipeline File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/functools.py", line 969, in get val = self.func(instance) File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 247, in pipeline raise e File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 225, in pipeline pipeline = pipeline_creator( File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf_utils.py", line 279, in create_transformers_pipeline return _create_hf_transformers_pipeline(task, model, revision) File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf_utils.py", line 186, in _create_hf_transformers_pipeline from transformers import pipeline, AutoTokenizer, AutoConfig, AutoModelForCausalLM ModuleNotFoundError: No module named 'transformers'

It seems that you are missing some dependencies. This is not a bug of LeptonAI library, and is due to the underlying photon requiring dependencies. When running photons locally, we intentionally refrain from installing these dependencies for you, in order to not mess with your local environment. You can manually install the missing dependencies by looking at the exception above.

According to the photon's metadata, dependencies can be installed via: pip install ctransformers Kindly install the dependencies and try again.


2个问题
-  HuggingFace 没有下载模型

(.py3) play@mini ~ % ls ~/.cache/huggingface/ ls: /Users/play/.cache/huggingface/: No such file or directory

-  ctransformers 已经安装,仍然提示没安装

(.py3) play@mini ~ % pip freeze |grep ctransformers ctransformers==0.2.27



## 怎么解决?
pip安装的 代码有问题?
makelove commented 5 months ago

Windows 平台没问题 是MacOS 出问题?

mqd273 commented 5 months ago

RuntimeError: Directory 'ui' does not exist ,windows 执行报没有UI 源码里面确实没有ui目录。