Spaces:
Running
Running
broadfield
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -106,6 +106,11 @@ def generate(prompt,history,mod=2,tok=4000,seed=1,role="ASSISTANT",data=None):
|
|
106 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
|
107 |
for response in stream:
|
108 |
output += response.token.text
|
|
|
|
|
|
|
|
|
|
|
109 |
yield output
|
110 |
yield history
|
111 |
yield prompt
|
@@ -192,7 +197,7 @@ def agent(prompt_in,history,mod=2):
|
|
192 |
if 'CREATE_FILE' in fn:
|
193 |
print('CREATE_FILE called')
|
194 |
out_w =generate(com,history,mod=mod,tok=None,seed=seed,role="CREATE_FILE")
|
195 |
-
build_space(out_w[0],out_w[1])
|
196 |
elif 'IMAGE' in fn:
|
197 |
print('IMAGE called')
|
198 |
out_im=gen_im(prompt,seed)
|
|
|
106 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
|
107 |
for response in stream:
|
108 |
output += response.token.text
|
109 |
+
|
110 |
+
reponame=""
|
111 |
+
filename=""
|
112 |
+
filecontent=""
|
113 |
+
|
114 |
yield output
|
115 |
yield history
|
116 |
yield prompt
|
|
|
197 |
if 'CREATE_FILE' in fn:
|
198 |
print('CREATE_FILE called')
|
199 |
out_w =generate(com,history,mod=mod,tok=None,seed=seed,role="CREATE_FILE")
|
200 |
+
build_space(out_w[0],out_w[1],out_w[2])
|
201 |
elif 'IMAGE' in fn:
|
202 |
print('IMAGE called')
|
203 |
out_im=gen_im(prompt,seed)
|