Spaces:
Running
Running
broadfield
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ def generate(prompt,history,mod=2,tok=4000,seed=1,role="ASSISTANT",data=None):
|
|
63 |
system_prompt = prompts.PATH_MAKER.replace("**CURRENT_OR_NONE**",str(data[4])).replace("**PROMPT**",json.dumps(data[0],indent=4)).replace("**HISTORY**",str(history))
|
64 |
formatted_prompt = format_prompt(prompt, mod, system_prompt)
|
65 |
elif role == "CREATE_FILE":
|
66 |
-
system_prompt = prompts.CREATE_FILE.replace("**TIMELINE**",data[4]).replace("**FILENAME**",str(data[
|
67 |
formatted_prompt = format_prompt(prompt, mod, system_prompt)
|
68 |
elif role == "SEARCH":
|
69 |
system_prompt = prompts.SEARCH.replace("**DATA**",data)
|
@@ -107,10 +107,10 @@ def generate(prompt,history,mod=2,tok=4000,seed=1,role="ASSISTANT",data=None):
|
|
107 |
for response in stream:
|
108 |
output += response.token.text
|
109 |
#print(file_content)
|
110 |
-
print(
|
111 |
yield 'test1'
|
112 |
yield data[1]
|
113 |
-
yield
|
114 |
|
115 |
#yield output
|
116 |
#yield history
|
|
|
63 |
system_prompt = prompts.PATH_MAKER.replace("**CURRENT_OR_NONE**",str(data[4])).replace("**PROMPT**",json.dumps(data[0],indent=4)).replace("**HISTORY**",str(history))
|
64 |
formatted_prompt = format_prompt(prompt, mod, system_prompt)
|
65 |
elif role == "CREATE_FILE":
|
66 |
+
system_prompt = prompts.CREATE_FILE.replace("**TIMELINE**",data[4]).replace("**FILENAME**",str(data[1]))
|
67 |
formatted_prompt = format_prompt(prompt, mod, system_prompt)
|
68 |
elif role == "SEARCH":
|
69 |
system_prompt = prompts.SEARCH.replace("**DATA**",data)
|
|
|
107 |
for response in stream:
|
108 |
output += response.token.text
|
109 |
#print(file_content)
|
110 |
+
print(output)
|
111 |
yield 'test1'
|
112 |
yield data[1]
|
113 |
+
yield output
|
114 |
|
115 |
#yield output
|
116 |
#yield history
|