Giter Club home page Giter Club logo

Comments (12)

yangheng95 avatar yangheng95 commented on June 12, 2024

请参见我在PyABSA种的封装 https://github.com/yangheng95/PyABSA/blob/release/examples/aspect_term_extraction/basic_usage.py

from lcf-atepc.

xu-2019 avatar xu-2019 commented on June 12, 2024

谢谢您,还有一个问题,我在谷歌云中上传整个文件后,pip install pyabsa,之后运行aspect_term_extraction/extract_aspects.py文件,出现错误如下:
Traceback (most recent call last):
File "examples/aspect_term_extraction/extract_aspects.py", line 8, in
from pyabsa import load_aspect_extractor
File "/usr/local/lib/python3.7/dist-packages/pyabsa/init.py", line 8, in
from .functional import train_apc, load_sentiment_classifier
File "/usr/local/lib/python3.7/dist-packages/pyabsa/functional.py", line 14, in
from pyabsa.apc.inferring.sentiment_classifier import SentimentClassifier
File "/usr/local/lib/python3.7/dist-packages/pyabsa/apc/inferring/sentiment_classifier.py", line 18, in
from pyabsa.apc.models.lcf_bert import LCF_BERT
File "/usr/local/lib/python3.7/dist-packages/pyabsa/apc/models/lcf_bert.py", line 11, in
from pyabsa.encoder.sa_encoder import Encoder
ModuleNotFoundError: No module named 'pyabsa.encoder'

尝试了安装该模块也不行,请问接下来怎么弄呀?

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

感谢您的反馈,刚刚修复了这个问题,请更新版本pip install pyabsa==0.6.6.1

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

我没有在谷歌云上测试过,如果遇到了其他问题欢迎反馈,感谢

from lcf-atepc.

xu-2019 avatar xu-2019 commented on June 12, 2024

您好,刚才那个py文件还是不能正常运行,出现错误如下:
Traceback (most recent call last):
File "examples/aspect_term_extraction/extract_aspects.py", line 36, in
auto_device=True # False means load model on CPU
File "/usr/local/lib/python3.7/dist-packages/pyabsa/functional.py", line 136, in load_aspect_extractor
raise RuntimeError('Not a valid model path!')
RuntimeError: Not a valid model path!

我运行笔记本是GPU类型的

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

您好,刚才那个py文件还是不能正常运行,出现错误如下:
Traceback (most recent call last):
File "examples/aspect_term_extraction/extract_aspects.py", line 36, in
auto_device=True # False means load model on CPU
File "/usr/local/lib/python3.7/dist-packages/pyabsa/functional.py", line 136, in load_aspect_extractor
raise RuntimeError('Not a valid model path!')
RuntimeError: Not a valid model path!

我运行笔记本是GPU类型的

请问您是否从Google Drive上下载了最新的模型并修改代码中模型的路径?
https://drive.google.com/drive/folders/19DxUn0ahL6e8VB7bcJ-z_eFH3Pw_Jnn2

from lcf-atepc.

xu-2019 avatar xu-2019 commented on June 12, 2024

我没有从Google Drive中下载,是刚从您github中下载封装的PyABSA,解压然后上传到从Google Drive中的,运行路径是examples/aspect_term_extraction/extract_aspects.py,您分享在Google Drive中的不是运行日志结果吗?

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

我没有从Google Drive中下载,是刚从您github中下载封装的PyABSA,解压然后上传到从Google Drive中的,运行路径是examples/aspect_term_extraction/extract_aspects.py,您分享在Google Drive中的不是运行日志结果吗?

你运行的是抽取方面的脚本,需要加载已经训练的模型,我在Google drive上传了已训练了的模型。如果你准备训练模型请使用train开头的脚本。

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

我没有从Google Drive中下载,是刚从您github中下载封装的PyABSA,解压然后上传到从Google Drive中的,运行路径是examples/aspect_term_extraction/extract_aspects.py,您分享在Google Drive中的不是运行日志结果吗?

image

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

我没有从Google Drive中下载,是刚从您github中下载封装的PyABSA,解压然后上传到从Google Drive中的,运行路径是examples/aspect_term_extraction/extract_aspects.py,您分享在Google Drive中的不是运行日志结果吗?

image

训练模型请使用这几个示例脚本
image

from lcf-atepc.

xu-2019 avatar xu-2019 commented on June 12, 2024

好的,谢谢您的耐心解答。

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

好的,谢谢您的耐心解答。

不用谢,有反馈才能有改进,祝研究顺利!

from lcf-atepc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.