如何从 google colab 上的 git 存储库导入函数

我想在 google colab 上调用 crf = ChainCRF() 并在 ChainCRF.py 上找到可用代码。

但是在google colab上从github克隆repo后,导入函数失败。

如何从 google colab 上的 git 存储库导入函数?

!git clone https://github.com/UKPLab/emnlp2017-bilstm-cnn-crf.git
from emnlp2017-bilstm-cnn-crf.neuralnets.keraslayers.ChainCR import ChainCRF

错误信息

  File "<ipython-input-24-b52cc86cddd3>",line 2
    from emnlp2017-bilstm-cnn-crf.neuralnets.keraslayers.ChainCR import ChainCRF
                  ^
SyntaxError: invalid syntax
yezhao07 回答:如何从 google colab 上的 git 存储库导入函数

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3280.html

大家都在问