[BIG PR] Gradio blocks & redesigned components#880
Conversation
Blocks components
- default -> default_value refactoring
- refactor output types into output_type and make them auto
- all events are implemented
- refactor fn: str -> Callable
- add change event to TabItem
- Remove KeyValues from components
- Resolve Components imports in inputs and outputs
- fix default parameter usage in demos
- fix default parameter usage in demos
- fix default parameter usage in demos
- docstring updates
- tweaks
- add change event to Tabs
* custom-components - create template components - changes in PKG and requires comes from scripts/install_gradio.sh * custom-components - tweaks * update-components - tweaks * update-components - fix get_block_name * update-components - add webcam demo * custom-components - make use of get_block_name function whenever possible * custom-components - tweaks * refactor-component-shortcuts - no description whatsoever :D * refactor-component-shortcuts - tweaks * refactor-component-shortcuts - create shortcut function "component" * refactor-component-shortcuts - reformat * refactor-component-shortcuts - tweaks * refactor-component-shortcuts - tweaks
Create Status Tracker component to report progress on function calls Co-authored-by: Ali Abid <aliabid94@gmail.com>
* add model3D * model3d component * add plot component * format * ingnore plot.svelte from prettier * update build script * update circleci config * remove circleci config change * change build script * remove change to build script * remove plot.svelte * remove duplicate save_flagged func * fix node space issue + format issues * Update ui.yml * Update ui.yml * Update ui.yml * remove changes to config files * updated codecov version * Update ui.yml Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
|
@aliabid94 good job, what a big PR! How was the conflict resolving part, was it too long :D |
| super().__init__(default_value=default, label=label) | ||
|
|
||
|
|
||
| class Image3D(C_Model3D): |
There was a problem hiding this comment.
Do we need to add Image3D here? These are just for backwards compatibility.
| class TestImage3D(unittest.TestCase): | ||
| def test_as_component(self): | ||
| Image3D = gr.test_data.BASE64_IMAGE3D | ||
| Image3D = media_data.BASE64_MODEL3D |
There was a problem hiding this comment.
it is better to deepcopy test_data in case any changes occur to them.
|
|
||
| def test_in_interface(self): | ||
| Image3D = gr.test_data.BASE64_IMAGE3D | ||
| Image3D = media_data.BASE64_MODEL3D |
There was a problem hiding this comment.
it is better to deepcopy test_data in case any changes occur to them.
| aiohttp.ClientSession.post.assert_called() | ||
| self.assertEqual(response.status_code, 200) | ||
| io.close() | ||
| # class TestFlagging(unittest.TestCase): |
There was a problem hiding this comment.
hmm, why did we comment out these tests?
| with tempfile.TemporaryDirectory() as tmpdirname: | ||
| to_save = Image3D_output.save_flagged( | ||
| tmpdirname, "Image3D_output", gr.test_data.BASE64_IMAGE3D, None | ||
| tmpdirname, "Image3D_output", media_data.BASE64_MODEL3D, None |
There was a problem hiding this comment.
it is better to deepcopy test_data in case any changes occur to them.
| self.assertEqual("Image3D_output/0.gltf", to_save) | ||
| to_save = Image3D_output.save_flagged( | ||
| tmpdirname, "Image3D_output", gr.test_data.BASE64_IMAGE3D, None | ||
| tmpdirname, "Image3D_output", media_data.BASE64_MODEL3D, None |
There was a problem hiding this comment.
it is better to deepcopy test_data in case any changes occur to them.
|
@aliabid94 this test started fail in another PR after your merge, did you had any changes about this function or data? If not it might be because of non deepcopied test_data I commented about above. |
It was because certain files were reorganized in |
Opening this PR as a draft so that we can start thinking about merging it into
main.Of course, before we can merge it in, we need to:
Interfaceclass in terms of BlocksInterfaceclass