gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.64k stars 2.55k forks source link

AttributeError: no attribute 'TabbedInterface' or 'Tabs' #1476

Closed bchanlee closed 2 years ago

bchanlee commented 2 years ago

I'm using Hugging Face Spaces and have AttributeError: module 'gradio' has no attribute 'TabbedInterface' when using gr.TabbedInterface( ). This similarly appears when I'm using gr.Tabs( ). Other features like gr.Blocks( ) work fine.

I have the following dependencies on requirements.txt: transformers tensorflow gradio (also tried gradio==3.0 and gradio==3.0.12)

I was wondering how to fix this issue as there are examples on Spaces where Tabs or TabbedInterface produce no AttributeError.

abidlabs commented 2 years ago

Hi @bchanlee, thanks for creating the issue. I can't seem to reproduce this issue.

Please see a simple working example of gr.TabbedInterface with the requirements you specified. (Note you don't need to put gradio in the requirements.txt file):

https://huggingface.co/spaces/abidlabs/test-gr

bchanlee commented 2 years ago

Hi @abidlabs, thanks for the quick update!

I had to change a line in the README file from sdk_version: 2.9.4 to sdk_version: 3.0.12 (although I assumed gradio==3.0.12 in requirements.txt would work around this).