Chand11 commited on
Commit
910dcb6
·
verified ·
1 Parent(s): b51e045

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -75,6 +75,10 @@ def fix_all_known_errors(code):
75
  code = re.sub(r'\.shift\(RIGHT\s*\*\s*\d+\.?\d*\)', '.shift(RIGHT*2)', code)
76
  code = re.sub(r'\.to_edge\((UP|DOWN|LEFT|RIGHT)\)(?!\s*,)', r'.to_edge(\1, buff=0.8)', code)
77
 
 
 
 
 
78
  # Add color=BLACK to Text/MathTex without color
79
  def add_black(match):
80
  text = match.group(0)
@@ -192,7 +196,7 @@ class MathExplainer(Scene):
192
  self.camera.background_color = WHITE
193
 
194
  # Title Card (2 sec)
195
- title = Text("Topic Title", font_size=32, color=BLACK, weight=BOLD)
196
  self.play(Write(title), run_time=1)
197
  self.wait(2)
198
  self.play(FadeOut(title))
@@ -201,7 +205,7 @@ class MathExplainer(Scene):
201
  # ... your explanation with proper FadeOuts
202
 
203
  # Conclusion
204
- conclusion = Text("Key Takeaway", font_size=28, color=GREEN, weight=BOLD)
205
  self.play(Write(conclusion), run_time=1)
206
  self.wait(2)
207
  self.play(FadeOut(conclusion))
 
75
  code = re.sub(r'\.shift\(RIGHT\s*\*\s*\d+\.?\d*\)', '.shift(RIGHT*2)', code)
76
  code = re.sub(r'\.to_edge\((UP|DOWN|LEFT|RIGHT)\)(?!\s*,)', r'.to_edge(\1, buff=0.8)', code)
77
 
78
+ # Remove unsupported parameters
79
+ code = re.sub(r',\s*weight=\w+', '', code) # Remove weight parameter
80
+ code = re.sub(r'weight=\w+,\s*', '', code) # Remove weight at start
81
+
82
  # Add color=BLACK to Text/MathTex without color
83
  def add_black(match):
84
  text = match.group(0)
 
196
  self.camera.background_color = WHITE
197
 
198
  # Title Card (2 sec)
199
+ title = Text("Topic Title", font_size=32, color=BLACK)
200
  self.play(Write(title), run_time=1)
201
  self.wait(2)
202
  self.play(FadeOut(title))
 
205
  # ... your explanation with proper FadeOuts
206
 
207
  # Conclusion
208
+ conclusion = Text("Key Takeaway", font_size=28, color=GREEN)
209
  self.play(Write(conclusion), run_time=1)
210
  self.wait(2)
211
  self.play(FadeOut(conclusion))