Spaces:
Sleeping
Sleeping
Commit
·
2b54ce7
1
Parent(s):
5126c5a
globalize instruct history in generate function
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ pipe = pipeline(
|
|
29 |
|
30 |
|
31 |
def generate(user_prompt, temperature=0.1, max_new_tokens=128, top_p=0.95, repetition_penalty=1.0):
|
32 |
-
global
|
33 |
|
34 |
temperature = float(temperature)
|
35 |
if temperature < 1e-2:
|
@@ -97,6 +97,6 @@ with gr.Blocks() as demo:
|
|
97 |
transcribe_btn.click(fn=transcribe, inputs=[audio_input],
|
98 |
outputs=[output_audio])
|
99 |
|
100 |
-
|
101 |
-
demo.queue()
|
102 |
-
demo.launch()
|
|
|
29 |
|
30 |
|
31 |
def generate(user_prompt, temperature=0.1, max_new_tokens=128, top_p=0.95, repetition_penalty=1.0):
|
32 |
+
global instruct_history
|
33 |
|
34 |
temperature = float(temperature)
|
35 |
if temperature < 1e-2:
|
|
|
97 |
transcribe_btn.click(fn=transcribe, inputs=[audio_input],
|
98 |
outputs=[output_audio])
|
99 |
|
100 |
+
if __name__ == "__main__":
|
101 |
+
demo.queue()
|
102 |
+
demo.launch()
|