Update app.py
Browse files
app.py
CHANGED
|
@@ -226,7 +226,7 @@ def generate_auswahl(prompt, file, chatbot, history, rag_option, model_option, o
|
|
| 226 |
##################################################
|
| 227 |
#zu einem Text-Prompt ein Bild via Stable Diffusion generieren
|
| 228 |
def generate_bild(prompt, chatbot, model_option_zeichnen='HuggingFace', temperature=0.5, max_new_tokens=4048,top_p=0.6, repetition_penalty=1.3):
|
| 229 |
-
if (model_option_zeichnen == "
|
| 230 |
print("Bild Erzeugung HF..............................")
|
| 231 |
#Bild nach Anweisung zeichnen und in History darstellen...
|
| 232 |
data = {"inputs": prompt}
|
|
@@ -493,7 +493,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 493 |
with gr.Column(min_width=50, scale=1):
|
| 494 |
with gr.Tab(label="Parameter Einstellung"):
|
| 495 |
#gr.Markdown("# Parameters")
|
| 496 |
-
model_option_zeichnen = gr.Radio(["
|
| 497 |
|
| 498 |
|
| 499 |
gr.Markdown(description)
|
|
|
|
| 226 |
##################################################
|
| 227 |
#zu einem Text-Prompt ein Bild via Stable Diffusion generieren
|
| 228 |
def generate_bild(prompt, chatbot, model_option_zeichnen='HuggingFace', temperature=0.5, max_new_tokens=4048,top_p=0.6, repetition_penalty=1.3):
|
| 229 |
+
if (model_option_zeichnen == "Stable Diffusion"):
|
| 230 |
print("Bild Erzeugung HF..............................")
|
| 231 |
#Bild nach Anweisung zeichnen und in History darstellen...
|
| 232 |
data = {"inputs": prompt}
|
|
|
|
| 493 |
with gr.Column(min_width=50, scale=1):
|
| 494 |
with gr.Tab(label="Parameter Einstellung"):
|
| 495 |
#gr.Markdown("# Parameters")
|
| 496 |
+
model_option_zeichnen = gr.Radio(["Stable Diffusion","DallE"], label="Modellauswahl", value = "Stable Diffusion")
|
| 497 |
|
| 498 |
|
| 499 |
gr.Markdown(description)
|