dn6 HF staff commited on
Commit
a0f2ea5
β€’
1 Parent(s): d35f312

add description and examples

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -1,8 +1,19 @@
 
1
  import comet_ml
2
  import uuid
3
  import gradio as gr
4
 
5
 
 
 
 
 
 
 
 
 
 
 
6
  class MyProject:
7
  def __init__(self):
8
  self.experiment = None
@@ -87,7 +98,13 @@ class MyProject:
87
 
88
  outputs = gr.Image(label="Image")
89
 
90
- interface = gr.Interface(self.predict, inputs=[model, prompt], outputs=outputs)
 
 
 
 
 
 
91
 
92
  return interface
93
 
 
1
+ from pydoc import describe
2
  import comet_ml
3
  import uuid
4
  import gradio as gr
5
 
6
 
7
+ DESCRIPTION = """Glad to see you here πŸ˜„.
8
+ You can use this Space to log predictions to [Comet](https://www.comet.ml/site) from Spaces that use Text to Image Diffusion Models.
9
+
10
+ Keep track of all your prompts and generated images so that you can easily find the good ones!
11
+
12
+ Set your Comet credentials in the Comet Settings tab, and select the Space you want to log predictions
13
+ from in the Diffusion Model tab
14
+ """
15
+
16
+
17
  class MyProject:
18
  def __init__(self):
19
  self.experiment = None
 
98
 
99
  outputs = gr.Image(label="Image")
100
 
101
+ interface = gr.Interface(
102
+ self.predict,
103
+ inputs=[model, prompt],
104
+ outputs=outputs,
105
+ examples=[["spaces/valhalla/glide-text2im", "An oil painting of a corgi"]],
106
+ description=DESCRIPTION,
107
+ )
108
 
109
  return interface
110