Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ def generate_img(prompt):
|
|
15 |
|
16 |
def interrogate(img):
|
17 |
from gradio_client import Client
|
18 |
-
client = Client("fffiloni/CLIP-Interrogator-2")
|
19 |
-
client.view_api()
|
20 |
client = Client("https://pharmapsychotic-clip-interrogator.hf.space/")
|
21 |
client.view_api()
|
22 |
result = client.predict(
|
@@ -28,7 +28,7 @@ def interrogate(img):
|
|
28 |
return result
|
29 |
def rountrip(img):
|
30 |
prompt=interrogate(img)
|
31 |
-
return generate_img(prompt)
|
32 |
|
33 |
-
demo = gr.Interface(rountrip, gr.Image(type= 'filepath'),gr.Image(type= 'filepath'))
|
34 |
demo.launch()
|
|
|
15 |
|
16 |
def interrogate(img):
|
17 |
from gradio_client import Client
|
18 |
+
# client = Client("fffiloni/CLIP-Interrogator-2")
|
19 |
+
# client.view_api()
|
20 |
client = Client("https://pharmapsychotic-clip-interrogator.hf.space/")
|
21 |
client.view_api()
|
22 |
result = client.predict(
|
|
|
28 |
return result
|
29 |
def rountrip(img):
|
30 |
prompt=interrogate(img)
|
31 |
+
return generate_img(prompt),prompt
|
32 |
|
33 |
+
demo = gr.Interface(rountrip, gr.Image(type= 'filepath'),[gr.Image(type= 'filepath'),"textbox"])
|
34 |
demo.launch()
|