suko commited on
Commit
60514b9
β€’
1 Parent(s): 7fa41fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -91,6 +91,7 @@ EXPORT_MODEL_VERSION=1
91
  model = ONNXModel(dir_path="model.onnx")
92
  model.load()
93
 
 
94
  def predict(image):
95
  image = Image.fromarray(np.uint8(image), 'RGB')
96
  prediction = model.predict(image)
@@ -101,20 +102,19 @@ def predict(image):
101
  inputs = gr.inputs.Image(type="pil")
102
  outputs = gr.outputs.JSON()
103
 
104
- text_element = "This model and website are created by KUO SUKO, C110156115 from NKUST"
105
-
106
 
107
  interface = gr.Interface(
108
  fn=predict,
109
  inputs=inputs,
110
  outputs=outputs,
111
  title="Naked Detector",
112
- description="πŸ˜³πŸ†",
113
  examples=[[Image.new("RGB", (224, 224))]],
114
  theme="default",
115
  layout="vertical",
116
  )
117
 
118
- interface.interface.footer = text_element
119
 
120
  interface.launch()
 
91
  model = ONNXModel(dir_path="model.onnx")
92
  model.load()
93
 
94
+
95
  def predict(image):
96
  image = Image.fromarray(np.uint8(image), 'RGB')
97
  prediction = model.predict(image)
 
102
  inputs = gr.inputs.Image(type="pil")
103
  outputs = gr.outputs.JSON()
104
 
105
+ text_element = "This model and website are created by KUO SUKO, C110156115 from NKUST."
 
106
 
107
  interface = gr.Interface(
108
  fn=predict,
109
  inputs=inputs,
110
  outputs=outputs,
111
  title="Naked Detector",
112
+ description="πŸ†πŸ˜³",
113
  examples=[[Image.new("RGB", (224, 224))]],
114
  theme="default",
115
  layout="vertical",
116
  )
117
 
118
+ interface.additional_styles = {"body": {"margin": "10px"}}
119
 
120
  interface.launch()