Johannes commited on
Commit
8c361b7
·
1 Parent(s): 5b1f473

add article

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -76,10 +76,15 @@ def infer(img_array: np.ndarray, sampling: str):
76
  return init_text, init_fig, compressed_text, compressed_fig, comparison_fig
77
 
78
 
 
 
 
 
79
  gr.Interface(
80
  title="Vector Quantization with scikit-learn",
81
  description="""<p style="text-align: center;">This is an interactive demo for the <a href="https://scikit-learn.org/stable/auto_examples/cluster/plot_face_compress.html">Vector Quantization Tutorial</a> from scikit-learn.
82
  </br>You can upload an image and choose from two sampling methods - *uniform* and *kmeans*.</p>""",
 
83
  fn=infer,
84
  inputs=[gr.Image(image_mode="L", label="Input Image"),
85
  gr.Dropdown(choices=["uniform", "kmeans"], label="Sampling Method")],
 
76
  return init_text, init_fig, compressed_text, compressed_fig, comparison_fig
77
 
78
 
79
+ article = """<center>
80
+ Demo by <a href='https://huggingface.co/johko' target='_blank'>Johannes (johko) Kolbe</a>"""
81
+
82
+
83
  gr.Interface(
84
  title="Vector Quantization with scikit-learn",
85
  description="""<p style="text-align: center;">This is an interactive demo for the <a href="https://scikit-learn.org/stable/auto_examples/cluster/plot_face_compress.html">Vector Quantization Tutorial</a> from scikit-learn.
86
  </br>You can upload an image and choose from two sampling methods - *uniform* and *kmeans*.</p>""",
87
+ article=article,
88
  fn=infer,
89
  inputs=[gr.Image(image_mode="L", label="Input Image"),
90
  gr.Dropdown(choices=["uniform", "kmeans"], label="Sampling Method")],