c-o-s
commited on
Commit
Β·
097e86c
1
Parent(s):
07b0167
Initial commit
Browse files- .gitignore +2 -0
- README.md +13 -5
- app.py +33 -0
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
**/flagged
|
2 |
+
.DS_Store
|
README.md
CHANGED
@@ -1,12 +1,20 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.44.4
|
8 |
app_file: app.py
|
9 |
-
pinned:
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: YeahPyc
|
3 |
+
emoji: π πΎ π
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: blue
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.44.4
|
8 |
app_file: app.py
|
9 |
+
pinned: true
|
10 |
+
license: afl-3.0
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
---
|
16 |
+
|
17 |
+
### About
|
18 |
+
|
19 |
+
This demo is a test for generating a SDXL LORA.
|
20 |
+
It allows a user to upload selfies and train a LORA with the images and generate images with this that show the person trained in a specific situation that has been prompted (hardcoded atm).
|
app.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
|
4 |
+
sex_value = ""
|
5 |
+
age_value = 0
|
6 |
+
|
7 |
+
def prompt(user_upload, name, sex_value, age_value):
|
8 |
+
|
9 |
+
if sex_value == "male":
|
10 |
+
sex = "man"
|
11 |
+
elif sex_value == "female":
|
12 |
+
sex = "women"
|
13 |
+
else:
|
14 |
+
sex = "nutral person"
|
15 |
+
|
16 |
+
return "RAW photo, VAR TRIGGERWORD, photo a " + sex + ",wearing a suit, " + str(age_value) + " years old,standing on a huge stage, energetic pose, wide shot, huge american flag in background, stage lighting --n (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation", name
|
17 |
+
|
18 |
+
|
19 |
+
demo = gr.Interface(
|
20 |
+
fn=prompt,
|
21 |
+
inputs=[
|
22 |
+
gr.Files(label="upload 10 pics", file_count="multiple", file_types=["image", ".jpg"]),
|
23 |
+
gr.Textbox(label="name"),
|
24 |
+
gr.Radio(["male", "female", "none binary"], label="sex"),
|
25 |
+
gr.Slider(18, 99, step=1, label="age")
|
26 |
+
],
|
27 |
+
outputs=[
|
28 |
+
gr.Textbox(label="prompt"),
|
29 |
+
gr.Textbox(label="name"),
|
30 |
+
]
|
31 |
+
)
|
32 |
+
|
33 |
+
demo.launch()
|