FIXED RuntimeError: CUDA has been initialized before importing the `spaces` package

#4
No description provided.

The problem lies in not having spaces package imported correctly and having 2 decorators set in the same app.py.

Imported spaces correctly

Commented the GPU context manager out since it failed because there is no "GPU" in spaces.

I left the first decorator over the generate function as is (removed the duration parameter since I believe spaces does not allow setting duration below 60)
Removed the 2nd decorator from the ranking function as it is not needed

For my expirements I added a way to check for cuda availability. (I believe you can remove that if you want)

zhiqiulin changed pull request status to merged

Sign up or log in to comment