Vector857 commited on
Commit
75891ec
·
verified ·
1 Parent(s): e47d031

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -714,25 +714,25 @@ with gr.Blocks(title="D-REX Studio") as app:
714
  lambda: ([], "<div style='font-size:11px;font-family:monospace;color:#524e4a;padding:12px;text-align:center'>history cleared</div>"),
715
  outputs=[history_state, history_html],
716
  )
717
-
718
- # ── IMAGE TOOLS LOGIC (இங்கே பேஸ்ட் செய்யவும்) ──
719
- def simple_upscale(img):
720
- if img is None: return None
721
- width, height = img.size
722
- # LANCZOS ரீசைசிங் இமேஜ் குவாலிட்டியை ஓரளவிற்கு நன்றாக வைத்திருக்கும்
723
- return img.resize((width * 2, height * 2), Image.LANCZOS)
724
-
725
- upscale_btn.click(
726
- fn=simple_upscale,
727
- inputs=[input_tool_img],
728
- outputs=[output_tool_img]
729
- )
730
 
731
- # ── LAUNCH ────────────────────────────────────────────────────────────────────
 
 
 
 
 
 
 
 
 
 
 
732
 
 
 
733
  app.queue()
734
  app.launch(
735
  theme=drex_theme,
736
  css=CSS,
737
  js=JS_INIT,
738
- )
 
714
  lambda: ([], "<div style='font-size:11px;font-family:monospace;color:#524e4a;padding:12px;text-align:center'>history cleared</div>"),
715
  outputs=[history_state, history_html],
716
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
717
 
718
+ # ── IMAGE TOOLS LOGIC ──
719
+ # இந்த வரிகள் அனைத்தும் 'with gr.Blocks' பிளாக்கிற்குள் (Indentation-உடன்) இருக்க வேண்டும்
720
+ def simple_upscale(img):
721
+ if img is None: return None
722
+ width, height = img.size
723
+ return img.resize((width * 2, height * 2), Image.LANCZOS)
724
+
725
+ upscale_btn.click(
726
+ fn=simple_upscale,
727
+ inputs=[input_tool_img],
728
+ outputs=[output_tool_img]
729
+ )
730
 
731
+ # இங்கிருந்துதான் Blocks முடிகிறது (Indentation வெளியே வந்துவிடும்)
732
+ # ── LAUNCH ────────────────────────────────────────────────────────────────────
733
  app.queue()
734
  app.launch(
735
  theme=drex_theme,
736
  css=CSS,
737
  js=JS_INIT,
738
+ )