File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 3
3
import subprocess
4
4
import gradio as gr
5
5
import os .path as osp
6
+ import platform
6
7
from src .utils .helper import load_description
7
8
from src .gradio_pipeline import GradioPipeline , GradioPipelineAnimal
8
9
from src .config .crop_config import CropConfig
9
10
from src .config .argument_config import ArgumentConfig
10
11
from src .config .inference_config import InferenceConfig
11
12
13
+ if platform .system () == "Windows" :
14
+ import pathlib
15
+ temp = pathlib .PosixPath
16
+ pathlib .PosixPath = pathlib .WindowsPath
12
17
13
18
def partial_fields (target_class , kwargs ):
14
19
return target_class (** {k : v for k , v in kwargs .items () if hasattr (target_class , k )})
Original file line number Diff line number Diff line change 3
3
import os .path as osp
4
4
import tyro
5
5
import subprocess
6
+ import platform
6
7
from src .config .argument_config import ArgumentConfig
7
8
from src .config .inference_config import InferenceConfig
8
9
from src .config .crop_config import CropConfig
9
10
11
+ if platform .system () == "Windows" :
12
+ import pathlib
13
+ temp = pathlib .PosixPath
14
+ pathlib .PosixPath = pathlib .WindowsPath
15
+
10
16
def partial_fields (target_class , kwargs ):
11
17
return target_class (** {k : v for k , v in kwargs .items () if hasattr (target_class , k )})
12
18
You can’t perform that action at this time.
0 commit comments