Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,6 +76,19 @@ def generate(prompt, history):
|
|
| 76 |
yield [(prompt,output)],output1
|
| 77 |
|
| 78 |
def run(inp,model_drop):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
prompt=inp['PROMPT']
|
| 80 |
#if len(inp)>max_prompt:
|
| 81 |
# inp = condense(inp)
|
|
|
|
| 76 |
yield [(prompt,output)],output1
|
| 77 |
|
| 78 |
def run(inp,model_drop):
|
| 79 |
+
prompt=inp['PROMPT']
|
| 80 |
+
model=loaded_model[int(model_drop)]
|
| 81 |
+
out_img=model(resp)
|
| 82 |
+
print(out_img)
|
| 83 |
+
url=f'https://omnibus-meme-diffusion.hf.space/file={out_img}'
|
| 84 |
+
print(url)
|
| 85 |
+
uid = uuid.uuid4()
|
| 86 |
+
r = requests.get(url, stream=True)
|
| 87 |
+
if r.status_code == 200:
|
| 88 |
+
out = Image.open(io.BytesIO(r.content))
|
| 89 |
+
return out
|
| 90 |
+
|
| 91 |
+
def run_OG(inp,model_drop):
|
| 92 |
prompt=inp['PROMPT']
|
| 93 |
#if len(inp)>max_prompt:
|
| 94 |
# inp = condense(inp)
|