File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change
1
+ .git/
Original file line number Diff line number Diff line change @@ -7,21 +7,19 @@ class MasterpieceCreator(ServeGradio):
7
7
outputs = gr .outputs .Image (type = "auto" , label = "Your masterpiece is ready" )
8
8
enable_queue = True
9
9
10
- def __init__ (self , * args , ** kwargs ):
11
- super ().__init__ (* args , ** kwargs )
12
-
13
10
def predict (self , prompt ):
14
- da = self .model .create (
11
+ results = self .model .create (
15
12
text_prompts = prompt ,
16
13
width_height = [512 , 512 ],
17
14
n_batches = 1 ,
18
15
)
19
- da [0 ].load_uri_to_image_tensor ()
20
- return da [0 ].tensor
16
+ result = results [0 ]
17
+ result .load_uri_to_image_tensor ()
18
+ return result .tensor
21
19
22
20
def build_model (self ):
23
21
import discoart
24
22
return discoart
25
23
26
24
27
- app = L .LightningApp (MasterpieceCreator (cloud_compute = L .CloudCompute ("gpu-fast " )))
25
+ app = L .LightningApp (MasterpieceCreator (cloud_compute = L .CloudCompute ("gpu" )))
You can’t perform that action at this time.
0 commit comments