Hyphonical commited on
Commit
263de18
·
1 Parent(s): e0d81d7

🚫 Fix Wrapper

Browse files
Files changed (1) hide show
  1. App.py +3 -17
App.py CHANGED
@@ -307,10 +307,8 @@ with App.Blocks(
307
  InputVideo = App.Video(
308
  label='Input Video', sources=['upload'], height=300
309
  )
310
- def GetModelNames():
311
- return [Path(model).stem for model in Upscaler().ListModels()]
312
-
313
- ModelNames = GetModelNames()
314
  InputModel = App.Dropdown(
315
  choices=ModelNames,
316
  label='Select Model',
@@ -425,20 +423,8 @@ with App.Blocks(
425
  outputs=[InputThreshold, InputMinPercentage, InputMaxRectangles, InputPadding, InputSegmentRows, InputSegmentColumns, InputFullFrameInterval],
426
  )
427
 
428
- def ProcessWrapper(InputVideo, InputModel, InputUseRegions, InputThreshold, InputMinPercentage, InputMaxRectangles, InputPadding, Progress=App.Progress()):
429
- return Upscaler().Process(
430
- InputVideo,
431
- InputModel,
432
- InputUseRegions,
433
- InputThreshold,
434
- InputMinPercentage,
435
- InputMaxRectangles,
436
- InputPadding,
437
- Progress
438
- )
439
-
440
  SubmitButton.click(
441
- fn=ProcessWrapper,
442
  inputs=[
443
  InputVideo,
444
  InputModel,
 
307
  InputVideo = App.Video(
308
  label='Input Video', sources=['upload'], height=300
309
  )
310
+ ModelList = Upscaler().ListModels()
311
+ ModelNames = [Path(Model).stem for Model in ModelList]
 
 
312
  InputModel = App.Dropdown(
313
  choices=ModelNames,
314
  label='Select Model',
 
423
  outputs=[InputThreshold, InputMinPercentage, InputMaxRectangles, InputPadding, InputSegmentRows, InputSegmentColumns, InputFullFrameInterval],
424
  )
425
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  SubmitButton.click(
427
+ fn=Upscaler().Process,
428
  inputs=[
429
  InputVideo,
430
  InputModel,