Skip to content

Commit

Permalink
Update spacy dependency so demo project can run
Browse files Browse the repository at this point in the history
Currently, the musicgen_app.py demo does not run; it fails with the
following error:

> pydantic.errors.PydanticImportError: `pydantic:ConstrainedStr` has been removed in V2.

It is possible to resolve this error by upping the spaCy dependency,
which is what's bringing in the old version of pydantic.

spaCy 3.6.1+ support the new Pydantic version:

https://github.com/explosion/spaCy/releases/tag/v3.6.1
  • Loading branch information
jamesonwilliams committed Nov 22, 2023
1 parent 3c41377 commit d632b14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demos/musicgen_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def ui_full(launch_kwargs):
with gr.Column():
radio = gr.Radio(["file", "mic"], value="file",
label="Condition on a melody (optional) File or Mic")
melody = gr.Audio(source="upload", type="numpy", label="File",
melody = gr.Audio(sources=["upload"], type="numpy", label="File",
interactive=True, elem_id="melody-input")
with gr.Row():
submit = gr.Button("Submit")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ julius
num2words
numpy
sentencepiece
spacy==3.5.2
spacy>=3.6.1
torch==2.1.0
torchaudio>=2.0.0
huggingface_hub
Expand Down

0 comments on commit d632b14

Please sign in to comment.