Spaces:
Runtime error
Runtime error
Anubhav Anubhav
commited on
Commit
·
b67b2c3
1
Parent(s):
66f7f0c
put flux.1-dev in app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,20 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(name):
|
| 4 |
-
|
| 5 |
|
| 6 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# import gradio as gr
|
| 2 |
|
| 3 |
+
# def greet(name):
|
| 4 |
+
# return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
+
# demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
+
# demo.launch()
|
| 8 |
+
import os
|
| 9 |
+
from huggingface_hub import InferenceClient
|
| 10 |
+
|
| 11 |
+
client = InferenceClient(
|
| 12 |
+
provider="together",
|
| 13 |
+
api_key=os.environ["HF_TOKEN"],
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
# output is a PIL.Image object
|
| 17 |
+
image = client.text_to_image(
|
| 18 |
+
"goku vs saitama",
|
| 19 |
+
model="black-forest-labs/FLUX.1-dev",
|
| 20 |
+
)
|