Comments (6)
I've modified the pdf github repo to be compatible with the latest gradio version. Opened #8386 to make some modifications to the guide.
from gradio.
ok, one last thing:
Do I need to gradio cc install
before gradio cc dev
?
In all the versions when I type gradio cc dev
my output is like this:
% gradio cc dev
♻ Launching demo/app.py in reload mode
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/cognitive/.pyenv/versions/3.11.5/lib/python3.11/site-packages/gradio/cli/commands/components/de │
│ v.py:83 in _dev │
│ │
│ 80 │ ) │
│ 81 │ │
│ 82 │ if gradio_node_path.returncode != 0: │
│ ❱ 83 │ │ raise ValueError( │
│ 84 │ │ │ "Could not find `@gradio/preview`. Run `npm i -D @gradio/preview` in your fr │
│ 85 │ │ ) │
│ 86 │
│ │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ app = PosixPath('demo/app.py') │ │
│ │ component_directory = PosixPath('/Users/cognitive/github/gradio/guides/gradio_pdf/books') │ │
│ │ gradio_node_path = CompletedProcess(args=['/usr/local/bin/node', '-e', │ │
│ │ "console.log(require.resolve('@gradio/preview'))"], returncode=1, │ │
│ │ stdout=b'', stderr=b"node:internal/modules/cjs/loader:1227\n throw │ │
│ │ err;\n ^\n\nError: Cannot find module '@gradio/preview'\nRequire │ │
│ │ stack:\n- │ │
│ │ /Users/cognitive/github/gradio/guides/gradio_pdf/books/frontend/[eval]\n │ │
│ │ at Module._resolveFilename │ │
│ │ (node:internal/modules/cjs/loader:1224:15)\n at Function.resolve │ │
│ │ (node:internal/modules/helpers:190:19)\n at [eval]:1:21\n at │ │
│ │ runScriptInThisContext (node:internal/vm:209:10)\n at │ │
│ │ node:internal/process/execution:118:14\n at [eval]-wrapper:6:24\n │ │
│ │ at runScript (node:internal/process/execution:101:62)\n at │ │
│ │ evalScript (node:internal/process/execution:136:3)\n at │ │
│ │ node:internal/main/eval_string:51:3 {\n code: 'MODULE_NOT_FOUND',\n │ │
│ │ requireStack: [\n │ │
│ │ '/Users/cognitive/github/gradio/guides/gradio_pdf/books/frontend/[eval]'\n │ │
│ │ ]\n}\n\nNode.js v22.1.0\n") │ │
│ │ gradio_path = '/Users/cognitive/.pyenv/versions/3.11.5/bin/gradio' │ │
│ │ host = 'localhost' │ │
│ │ node = '/usr/local/bin/node' │ │
│ │ python_path = '/Users/cognitive/.pyenv/versions/3.11.5/bin/python3' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Could not find `@gradio/preview`. Run `npm i -D @gradio/preview` in your frontend folder.
ok, so it still doesn't work after I run gradio cc install
but presumably I can install after changes and test from there... though hot-loading would be nice 🙏
from gradio.
ok, well.. I just realized I am trying to code with gradio_pdf
which was released in january, so before cc
became a module.
maybe I will try again from scratch with the newer code next time
from gradio.
Hi @cognitivetech ! Thanks for filing an issue and sorry for the trouble.
The five minute guide does not cover install
because it is run as a part of create
when building a new component. Seems like the issue stems from starting off of someone else's component. Will add a guide to cover that (or modify an existing guide).
BTW what do you mean by this - the --help
flag already shows a general description of each command like you show.
Beyond that, general description of the commands listed on gradio cc --help woudl be super
Also the issue with @gradio/preview
should not have anything to do with python 3.8. It's just that old components did not list it as a frontend dependency. Can you elaborate?
from gradio.
thanks freddy! i did find the gradio --help does work, later on.. so I deleted the first place mentioned on this issue, but failed to move from the other. I think I was just at my wits end trying a million different things. Maybe it was gradio --version
, gradio -H
or just gradio
that wasn't giving me the information I wanted at that moment... but ultimately I was just tired and salty. :-)
I just had such high hope after beginning to work on your HF space, but trying to develop that cc gave me grief.
I look forward to getting to know this project better!
from gradio.
hey @freddyaboulton just a friendly ping.
if you even have some basic instructions to get me started developing the cc, that would be great!
keeping busy with backend issues, but I just hope to get an MVP up sooner than later, and don't want to search anew for some other frontend solution.
from gradio.
Related Issues (20)
- gradio_client with remote HF private instance HOT 2
- Make placeholder a variable in ChatInterface class HOT 1
- Request to install PyCUDA in gradio Demo HOT 1
- Time out error while running gradio app HOT 7
- First time loading performance issue HOT 2
- drop to replace for Image component HOT 2
- Running MusicGen on huggingspace on older version of gradio works, but breaks on the current suggested version HOT 1
- Image component raises ValueError when it is updated with a callable value HOT 2
- Gradio reload mode does not work with Chatbot based app HOT 1
- 🔴 Real-Time Streaming like TextStreamer from Transformers HOT 1
- After upgrading from 3.45.1 to 4.36.1, fn in the button.click event cannot be fired HOT 7
- Unable to get gr.Request in the function with `every` HOT 1
- Gradio button doesn't allow to put tags in value HOT 1
- The Code component needs to support C source code. HOT 1
- Hot Reload issues in jupyter notebook
- Mixed Content: The page at 'https://' was loaded over HTTPS HOT 5
- You can't. It's too low HOT 1
- More Login Form Customization with Standard Block Parameters
- "You are using gradio version" should be a warning HOT 1
- Error while loading private space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.