Spaces:
Runtime error
Runtime error
lvyb
commited on
Commit
Β·
8c016fe
1
Parent(s):
de259a1
demo
Browse files
app.py
CHANGED
@@ -1,8 +1,20 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
3 |
|
4 |
-
description = "ζεηζεΎη"
|
5 |
-
examples = [["ε°η«"], ["cat"], ["dog"]]
|
6 |
|
7 |
-
demo = gr.Interface.load("models/runwayml/stable-diffusion-v1-5", description=description, examples=examples)
|
8 |
demo.launch()
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import gradio as gr
|
4 |
+
from transformers import pipeline
|
5 |
+
|
6 |
+
|
7 |
+
sd_description = "ζεηζεΎη"
|
8 |
+
sd_examples = [["ε°η«"], ["cat"], ["dog"]]
|
9 |
+
sd_demo = gr.Interface.load("models/runwayml/stable-diffusion-v1-5", title='ζεηζεΎη', examples=sd_examples)
|
10 |
+
|
11 |
+
|
12 |
+
pipe = pipeline("image-classification")
|
13 |
+
examples = [[os.path.join(os.path.dirname(__file__), "lion.jpg")], [os.path.join(os.path.dirname(__file__), "cat.jpeg")]]
|
14 |
+
app = gr.Interface.from_pipeline(pipe, examples=examples, title='εΎηθ―ε«')
|
15 |
+
|
16 |
|
17 |
+
demo = gr.TabbedInterface([sd_demo, app], ["ζεηζεΎη", "εΎηθ―ε«"])
|
18 |
|
|
|
|
|
19 |
|
|
|
20 |
demo.launch()
|
cat.jpeg
ADDED
![]() |
lion.jpg
ADDED
![]() |