mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
run python reload only if python file changed (#8194)
* run python reload only if python file changed * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
This commit is contained in:
parent
39791eb186
commit
2471f79527
5
.changeset/major-zoos-read.md
Normal file
5
.changeset/major-zoos-read.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:run python reload only if python file changed
|
@ -261,6 +261,7 @@ def watchfn(reloader: SourceFileReloader):
|
||||
# This is because the main demo file may import the changed file and we need the
|
||||
# changes to be reflected in the main demo file.
|
||||
|
||||
if changed.suffix == ".py":
|
||||
changed_in_copy = _remove_no_reload_codeblocks(str(changed))
|
||||
if changed != reloader.demo_file:
|
||||
changed_module = _find_module(changed)
|
||||
|
Loading…
Reference in New Issue
Block a user