Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ with gr.Blocks() as demo:
|
|
52 |
with gr.Column():
|
53 |
gr.Markdown(DESCRIPTION)
|
54 |
with gr.Column():
|
55 |
-
gr.Markdown("""###
|
56 |
|
57 |
with gr.Group():
|
58 |
chatbot = gr.Chatbot(label="Chatbot")
|
@@ -148,6 +148,7 @@ with gr.Blocks() as demo:
|
|
148 |
inference = pipe(sequences=message, streaming=True, **generation_config)
|
149 |
history[-1][1] += message
|
150 |
for token in inference:
|
|
|
151 |
history[-1][1] += token.generations[0].text
|
152 |
yield history
|
153 |
print(pipe.timer_manager)
|
@@ -193,7 +194,15 @@ with gr.Blocks() as demo:
|
|
193 |
queue=False,
|
194 |
).success(
|
195 |
generate,
|
196 |
-
inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
outputs=[chatbot],
|
198 |
api_name=False,
|
199 |
)
|
@@ -212,7 +221,15 @@ with gr.Blocks() as demo:
|
|
212 |
queue=False,
|
213 |
).then(
|
214 |
generate,
|
215 |
-
inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
outputs=[chatbot],
|
217 |
api_name=False,
|
218 |
)
|
|
|
52 |
with gr.Column():
|
53 |
gr.Markdown(DESCRIPTION)
|
54 |
with gr.Column():
|
55 |
+
gr.Markdown("""### Sparse Finetuned Llama Demo""")
|
56 |
|
57 |
with gr.Group():
|
58 |
chatbot = gr.Chatbot(label="Chatbot")
|
|
|
148 |
inference = pipe(sequences=message, streaming=True, **generation_config)
|
149 |
history[-1][1] += message
|
150 |
for token in inference:
|
151 |
+
print(token.generations[0].text)
|
152 |
history[-1][1] += token.generations[0].text
|
153 |
yield history
|
154 |
print(pipe.timer_manager)
|
|
|
194 |
queue=False,
|
195 |
).success(
|
196 |
generate,
|
197 |
+
inputs=[
|
198 |
+
saved_input,
|
199 |
+
chatbot,
|
200 |
+
max_new_tokens,
|
201 |
+
temperature,
|
202 |
+
top_p,
|
203 |
+
top_k,
|
204 |
+
repetition_penalty,
|
205 |
+
],
|
206 |
outputs=[chatbot],
|
207 |
api_name=False,
|
208 |
)
|
|
|
221 |
queue=False,
|
222 |
).then(
|
223 |
generate,
|
224 |
+
inputs=[
|
225 |
+
saved_input,
|
226 |
+
chatbot,
|
227 |
+
max_new_tokens,
|
228 |
+
temperature,
|
229 |
+
top_p,
|
230 |
+
top_k,
|
231 |
+
repetition_penalty,
|
232 |
+
],
|
233 |
outputs=[chatbot],
|
234 |
api_name=False,
|
235 |
)
|