-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cc fe 2 #5526
Merged
Merged
Cc fe 2 #5526
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ab82e75
tweaks
pngwn c94a80f
fix examples
pngwn ecc09cf
fix backend port
pngwn 3415ae7
fix things
pngwn a82c652
fix
pngwn dc1d165
Fix json component flagging
freddyaboulton da52870
Merge branch 'cc-fe-2' of github.com:gradio-app/gradio into cc-fe-2
freddyaboulton 0705794
fix
pngwn 0f125bf
fuix
pngwn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,9 +93,14 @@ def ignore(s, names): | |
source_package_json = json.load(open(str(frontend / "package.json"))) | ||
source_package_json["name"] = name.lower() | ||
for dep in source_package_json.get("dependencies", []): | ||
source_package_json["dependencies"][dep] = get_js_dependency_version( | ||
dep, p / "_frontend_code" | ||
) | ||
# if curent working directory is the gradio repo, use the local version of the dependency | ||
if ( | ||
"gradio/js/gradio-preview/test" not in pathlib.Path.cwd().as_posix() | ||
and dep.startswith("@gradio/") | ||
): | ||
source_package_json["dependencies"][dep] = get_js_dependency_version( | ||
dep, p / "_frontend_code" | ||
) | ||
|
||
json.dump( | ||
source_package_json, open(str(frontend / "package.json"), "w"), indent=2 | ||
|
@@ -125,7 +130,9 @@ def _create_backend(name: str, template: str, directory: pathlib.Path): | |
from {name.lower()} import {name} | ||
|
||
with gr.Blocks() as demo: | ||
{name}() | ||
{name}(interactive=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something is up when cloning the image component FYI UploadText.svelte:17 Uncaught (in promise) TypeError: ctx[1] is not a function
at create_fragment (UploadText.svelte:17:7)
at init (svelte-internal.js:3237:34)
at new UploadText (UploadText.svelte:19:37)
at createProxiedComponent (svelte-hooks.js:341:9)
at new ProxyComponent (proxy.js:242:7)
at new Proxy<UploadText> (proxy.js:349:11)
at Array.create_default_slot_1 (InteractiveImage.svelte:37:15)
at create_slot (svelte-internal.js:165:23)
at Array.create_if_block_1 (Image.svelte:219:52)
at Array.create_default_slot (Image.svelte:238:95) import gradio as gr
from newimage import NewImage
with gr.Blocks() as demo:
inp = NewImage(interactive=True)
out = NewImage(interactive=False)
# gr.Examples(["https://gradio-builds.s3.amazonaws.com/diffusion_image/cute_dog.jpg"],
# [inp], [out], fn=lambda s: s, cache_examples=True)
demo.launch() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually nvm this was my bad |
||
{name}(interactive=False) | ||
|
||
|
||
demo.launch() | ||
""" | ||
|
@@ -246,6 +253,7 @@ def _create( | |
) | ||
if pipe.returncode != 0: | ||
live.update(":red_square: NPM install [bold][red]failed[/][/]") | ||
live.update(pipe.stdout) | ||
live.update(pipe.stderr) | ||
else: | ||
live.update(":white_check_mark: NPM install succeeded!") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice good catch with
@gradio