Open GUUser91 opened 1 year ago
I'm not sure about Gradio, but it seems like it needs *.app
.
I ran the demo with python app.py
, but I recently found that our Docker base image is having trouble with Gradio version 3.20.1.
Could you please check the requirements in the Hugging Face space?
I installed all the new modules from the requirements.txt file in hugging face space. I get this error message after running app.py with python.
python app.py Traceback (most recent call last): File "/home/user/Downloads/pits/app.py", line 5, in
import utils File "/home/user/Downloads/pits/utils.py", line 8, in from omegaconf import OmegaConf File "/usr/lib/python3.10/site-packages/omegaconf/init.py", line 1, in from .base import Container, DictKeyType, Node, SCMode, UnionNode File "/usr/lib/python3.10/site-packages/omegaconf/base.py", line 11, in from ._utils import ( File "/usr/lib/python3.10/site-packages/omegaconf/_utils.py", line 34, in from .grammar_parser import SIMPLE_INTERPOLATION_PATTERN, parse File "/usr/lib/python3.10/site-packages/omegaconf/grammar_parser.py", line 12, in from .grammar_visitor import ( # type: ignore File "/usr/lib/python3.10/site-packages/omegaconf/grammar_visitor.py", line 25, in from omegaconf.grammar.gen.OmegaConfGrammarLexer import OmegaConfGrammarLexer File "/usr/lib/python3.10/site-packages/omegaconf/grammar/gen/OmegaConfGrammarLexer.py", line 204, in class OmegaConfGrammarLexer(Lexer): File "/usr/lib/python3.10/site-packages/omegaconf/grammar/gen/OmegaConfGrammarLexer.py", line 206, in OmegaConfGrammarLexer atn = ATNDeserializer().deserialize(serializedATN()) File "/home/user/.local/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 60, in deserialize self.reset(data) File "/home/user/.local/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 90, in reset temp = [ adjust(c) for c in data ] File "/home/user/.local/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 90, in temp = [ adjust(c) for c in data ] File "/home/user/.local/lib/python3.10/site-packages/antlr4/atn/ATNDeserializer.py", line 88, in adjust v = ord(c) TypeError: ord() expected string of length 1, but int found
I am not sure about using omegaconf==2.1.0 with python3.10.
Omegaconf might contains some bug for python3.10 (e.g. issue in omegaconf). I recommend to use lower version of python. I am currently using python 3.9 and 3.8 in different machines and they are working well without error.
I just check that Hugging face space is using python 3.8.9.
FROM docker.io/library/python:3.8.9@sha256:49d05fff9cb3b185b15ffd92d8e6bd61c20aa916133dca2e3dbe0215270faf53
It seems that I have to provide Dockerfile for demo...
Thank you for your reports.
I installed python 3.9 on windows and I get this error message.
python app.py Traceback (most recent call last): File "C:\Users\user\Desktop\pits\app.py", line 142, in
app = GradioApp(args) File "C:\Users\user\Desktop\pits\app.py", line 33, in init _ = utils.load_checkpoint(args.checkpoint_path, model_g=self.net_g) File "C:\Users\user\Desktop\pits\utils.py", line 22, in load_checkpoint assert os.path.isfile(checkpoint_path) AssertionError
The assertion error mentions that you haven't downloaded the checkpoint file.
Please note that the checkpoint is not uploaded to GitHub, it's only available on Hugging Face.
If you're having trouble setting it up locally, I recommend using the Hugging Face space instead of local inference.
Another question, is there a way to use the git command on hugging face? Something like this
git clone https://huggingface.co/spaces/anonymous-pits/pits/tree/main
You can just clone it with git clone https://huggingface.co/spaces/anonymous-pits/pits
For checkpoint included clone, you need to set git-lfs
. Check this page for it https://huggingface.co/docs/hub/repositories-getting-started#requirements
I run
But I get this error message after clicking on the link. Why?