File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 6
6
7
7
import logging
8
8
import unittest
9
+ import json
10
+
9
11
from apps .shark_studio .api .llm import LanguageModel
12
+ from apps .shark_studio .api .sd import shark_sd_fn_dict_input , view_json_file
13
+ from apps .shark_studio .web .utils .file_utils import get_resource_path
14
+
15
+ class SDAPITest (unittest .TestCase ):
16
+ def testSDSimple (self ):
17
+ from apps .shark_studio .modules .shared_cmd_opts import cmd_opts
18
+ import apps .shark_studio .web .utils .globals as global_obj
19
+
20
+ global_obj ._init ()
10
21
22
+ sd_json = view_json_file (get_resource_path ("../configs/default_sd_config.json" ))
23
+ sd_kwargs = json .loads (sd_json )
24
+ for arg in vars (cmd_opts ):
25
+ if arg in sd_kwargs :
26
+ sd_kwargs [arg ] = getattr (cmd_opts , arg )
27
+ for i in shark_sd_fn_dict_input (sd_kwargs ):
28
+ print (i )
11
29
12
30
class LLMAPITest (unittest .TestCase ):
13
31
def testLLMSimple (self ):
You can’t perform that action at this time.
0 commit comments