testdeep123 commited on
Commit
942c7b5
·
verified ·
1 Parent(s): e94007e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -1,16 +1,4 @@
1
- Okay, I understand the traceback indicates an issue with how the JavaScript was triggered using `_js` on the `demo.load()` event in Gradio. This syntax might be specific to certain Gradio versions or not the intended way to run JavaScript immediately upon interface load in all contexts.
2
 
3
- The primary goal of that JavaScript was to populate the prompt text next to each segment editor once the `segments_state` variable was populated by `generate_script_and_show_editor`. This is best handled directly by reacting to the `segments_state.change` event, which is already set up.
4
-
5
- I will remove the problematic `demo.load` event and ensure the `segments_state.change` event is correctly structured to call the JavaScript function.
6
-
7
- I will also put back the specific API keys you provided.
8
-
9
- Here is the updated code:
10
-
11
- ```python
12
- # Import necessary libraries (Ensure all are installed: moviepy, soundfile, torch,
13
- # pydub, requests, pillow, numpy, beautifulsoup4, gtts, gradio, kokoro, opencv-python)
14
 
15
  from kokoro import KPipeline
16
 
 
 
1
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  from kokoro import KPipeline
4