Spaces:
Runtime error
Runtime error
fix
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
import sys
|
4 |
from pathlib import Path
|
5 |
from transformers import pipeline
|
6 |
-
pipe = pipeline('text-generation', model_id='Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator')
|
7 |
models = [
|
8 |
"Yntec/NovelAIRemix",
|
9 |
"Joeythemonster/anything-midjourney-v-4-1",
|
@@ -20,7 +20,7 @@ models = [
|
|
20 |
]
|
21 |
current_model = models[0]
|
22 |
|
23 |
-
text_gen1=gr.Interface.load("
|
24 |
|
25 |
models2=[
|
26 |
gr.Interface.load(f"models/{models[0]}",live=True,preprocess=False),
|
@@ -113,8 +113,8 @@ with gr.Blocks(css=css) as myface:
|
|
113 |
|
114 |
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
|
115 |
|
116 |
-
|
117 |
-
see_prompts.click(magic1=get_valid_prompt(pipe(input_text.value, max_length=77)[0]['generated_text']))
|
118 |
|
119 |
|
120 |
myface.queue(concurrency_count=200)
|
|
|
3 |
import sys
|
4 |
from pathlib import Path
|
5 |
from transformers import pipeline
|
6 |
+
#pipe = pipeline('text-generation', model_id='Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator')
|
7 |
models = [
|
8 |
"Yntec/NovelAIRemix",
|
9 |
"Joeythemonster/anything-midjourney-v-4-1",
|
|
|
20 |
]
|
21 |
current_model = models[0]
|
22 |
|
23 |
+
text_gen1=gr.Interface.load("models/Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator")
|
24 |
|
25 |
models2=[
|
26 |
gr.Interface.load(f"models/{models[0]}",live=True,preprocess=False),
|
|
|
113 |
|
114 |
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
|
115 |
|
116 |
+
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
|
117 |
+
#see_prompts.click(magic1=get_valid_prompt(pipe(input_text.value, max_length=77)[0]['generated_text']))
|
118 |
|
119 |
|
120 |
myface.queue(concurrency_count=200)
|