Spaces:
Sleeping
Sleeping
add description and examples
Browse files
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|