运行python gardio_demo.py显示模块无法找到
(omni) D:\1\GitTools\OmniParser-master\OmniParser-master>python gradio_demo.py
WARNING: OMP_NUM_THREADS set to 24, not 1. The computation speed will not be optimized if you use data parallel. It will fail if this PaddlePaddle binary is compiled with OpenBlas since OpenBlas does not support multi-threads.
PLEASE USE OMP_NUM_THREADS WISELY.
[2025-02-27 18:34:34,372] [ WARNING] easyocr.py:80 - Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.
Florence2LanguageForConditionalGeneration has generative capabilities, as prepare_inputs_for_generation is explicitly overwritten. However, it doesn't directly inherit from GenerationMixin. From 👉v4.50👈 onwards, PreTrainedModel will NOT inherit from GenerationMixin, and this model will lose the ability to call generate and other related functions.
- If you're using
trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes - If you are the owner of the model architecture code, please modify your model class such that it inherits from
GenerationMixin(afterPreTrainedModel, otherwise you'll get an exception). - If you are not the owner of the model architecture class, please contact the model code owner to update it. 信息: 用提供的模式无法找到文件。
- Running on local URL: http://0.0.0.0:7861
- Running on public URL: https://d4c7dde35149c8e807.gradio.live
This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run gradio deploy from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)
有人吗?
Traceback (most recent call last):
File "C:\Users\liqia\OmniParser\gradio_demo.py", line 3, in
回溯(最近一次调用):文件“C:\Users\liqia\OmniParser\gradio_demo.py”,第 3 行,作为 gr 导入 gradioModuleNotFoundError:没有名为“gradio”的模块
大佬,我没搞懂,“没有名为“gradio”的模块”我是运行了requirements文件,理应都安装了的。我又重新安装了gradio,但最后运行的结果并没有改变
根据你的控制台信息只有一个线程超订阅的警告以及未使用torch gpu的提醒,请问是demo无法运行嘛,能否具体说明情况呢
Hi @soulliff ,
Please check whether you're using the same virtual environment for installing requirements and running gradio_demo.py. You can verify this using commands like which pip/pip list