添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
风流倜傥的炒粉  ·  Frappe Cloud custom ...·  7 小时前    · 
很拉风的鸭蛋  ·  Kindle Voyage ...·  6 月前    · 
欢快的冰淇淋  ·  pip ...·  10 月前    · 

Hi, I followed lesson 2 to build the Dogs vs. Cats model. I uploaded both the model pickle file and app.py file to Hugginface. Also added requirements.txt file in the folder with below dependency. Wondering if anyone know how to resolve this? really appreciate.

fastai
gradio

However Hugginface site can not build and show " Build failed with exit code: 1" error.
Log shows below error.

× Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [164 lines of output]
      Error compiling Cython file:
      ------------------------------------------------------------
          int length
      cdef class Vocab:
          cdef Pool mem
          cpdef readonly StringStore strings
      ------------------------------------------------------------
      spacy/vocab.pxd:28:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
      Error compiling Cython file:
      ------------------------------------------------------------
      cdef class Vocab:
          cdef Pool mem
          cpdef readonly StringStore strings
          cpdef public Morphology morphology
      ------------------------------------------------------------
      spacy/vocab.pxd:29:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
              

Actually I found out this is due to gradio syntax changed a bit. Use below worked.

image=gr.Image(width=192, height=192)
label=gr.Label()
examples=[‘dog.jpg’,‘cat.jpg’]
intf=gr.Interface(fn=classify_image,inputs=image,outputs=label,examples=examples)

thanks eric, i am running this code in kaggle but when i am clicking the link :

Running on local URL: http://127.0.0.1:7860

output : This site can’t be reached

127.0.0.1 refused to connect.

  • Checking the connection
  • Checking the proxy and the firewall
  • Running on public URL: https://8286e5ecb15619c4e5.gradio.live

    output : No interface is running right now

    please help!!!

    this is my notebook : notebook1ab43e0bcc | Kaggle