source-separation / tutorial

Tutorial covering Open Source tools for Source Separation.
https://source-separation.github.io/tutorial
Other
351 stars 38 forks source link

Gradio connection is messed up in "repetition.ipynb" #11

Open bryan-pardo opened 3 years ago

bryan-pardo commented 3 years ago

What Section? repetition.ipynb

Describe the bug In the tutorial python, something gets messed up with the Gradio connection. When you call repet.interact(share=True, source='microphone')

The following error gets thrown.


AttributeError Traceback (most recent call last)

in () 2 # interactively in Colab or Jupyter Notebook 3 ----> 4 repet.interact(share=True, source='microphone')

/usr/local/lib/python3.6/dist-packages/nussl/separation/base/separation_base.py in interact(self, add_residual, source, label, share) 127 if label is None: label = f"Separation via {type(self).name}" 128 --> 129 audio_in = gradio.inputs.Audio(source=source, type="file", label=label) 130 131 gradio.Interface(

AttributeError: module 'gradio' has no attribute 'inputs'


Finding this weird, I went ahead and made a new cell in the tutorial and grabbed the very first example code from Getting Started With Gradio:

` import gradio as gr

def greet(name): return "Hello " + name + "!"

iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch()

`

This threw the same error:

AttributeError: module 'gradio' has no attribute 'inputs' However, when I ran that code from Getting Started With Gradio in a fresh notebook, it ran just fine.

Steps To Reproduce See above

Expected behavior A working Gradio interface What did happen The error that was thrown (see above)

**Software versions*** I checked the gradio version in both the repetition.ipynb and the fresh ipynb, where the bug doesn't happen. No difference: version 1.4.0. Other version info below.

Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic Python 3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0] nussl 1.1.3rc5 scaper 1.6.4