Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,9 +67,13 @@ def generate(prompt, history):
|
|
| 67 |
output1=output.replace("\n"," ")
|
| 68 |
if "PROMPT:" and "MEME_TEXT:" in output1:
|
| 69 |
print("YES")
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
output=str(output1)
|
| 72 |
-
|
| 73 |
|
| 74 |
def run(inp,history,model_drop):
|
| 75 |
#if len(inp)>max_prompt:
|
|
|
|
| 67 |
output1=output.replace("\n"," ")
|
| 68 |
if "PROMPT:" and "MEME_TEXT:" in output1:
|
| 69 |
print("YES")
|
| 70 |
+
prompt_t=output1.split("PROMPT:",1)[1].split("MEME_TEXT:",1)[0]
|
| 71 |
+
print(prompt_t)
|
| 72 |
+
meme_t=output1.split("MEME_TEXT",1)[1]
|
| 73 |
+
print(meme_t)
|
| 74 |
+
output1={'PROMPT':prompt_t,'MEME_TEXT':meme_t}
|
| 75 |
output=str(output1)
|
| 76 |
+
yield [(prompt,output)],output1
|
| 77 |
|
| 78 |
def run(inp,history,model_drop):
|
| 79 |
#if len(inp)>max_prompt:
|