jclyo1 commited on
Commit
02f47d1
1 Parent(s): cdb1c42

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -0
main.py CHANGED
@@ -6,6 +6,7 @@ import subprocess
6
  import os
7
  import json
8
  import uuid
 
9
 
10
  import torch
11
  from diffusers import (
@@ -21,6 +22,9 @@ app = FastAPI()
21
  def generate_image(prompt, model):
22
  torch.cuda.empty_cache()
23
 
 
 
 
24
  modelArray = model.split(",")
25
  modelName = modelArray[0]
26
  modelVersion = modelArray[1]
 
6
  import os
7
  import json
8
  import uuid
9
+ import html
10
 
11
  import torch
12
  from diffusers import (
 
22
  def generate_image(prompt, model):
23
  torch.cuda.empty_cache()
24
 
25
+ prompt = html.escape(prompt)
26
+ model = html.escape(model)
27
+
28
  modelArray = model.split(",")
29
  modelName = modelArray[0]
30
  modelVersion = modelArray[1]