Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ openai.api_key = os.environ.get("OPENAI_API_KEY")
|
|
11 |
BASE_SYSTEM_MESSAGE = """"""
|
12 |
|
13 |
def make_prediction(prompt, max_tokens=None, temperature=None, top_p=None, top_k=None, repetition_penalty=None):
|
14 |
-
completion = openai.Completion.create(model="
|
15 |
for chunk in completion:
|
16 |
yield chunk["choices"][0]["text"]
|
17 |
|
@@ -76,7 +76,6 @@ with gr.Blocks(css=CSS) as demo:
|
|
76 |
with gr.Column():
|
77 |
gr.Markdown(f"""
|
78 |
## This demo is an unquantized GPU chatbot of [WizardCoder-Python-34B-V1.0-GGUF](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGUF)
|
79 |
-
Brought to you by your friends at Alignment Lab AI, garage-bAInd, Open Access AI Collective, and OpenChat!
|
80 |
""")
|
81 |
with gr.Row():
|
82 |
gr.Markdown("# π WizardCoder-Python-34B-V1.0-GGUF Playground Space! π")
|
|
|
11 |
BASE_SYSTEM_MESSAGE = """"""
|
12 |
|
13 |
def make_prediction(prompt, max_tokens=None, temperature=None, top_p=None, top_k=None, repetition_penalty=None):
|
14 |
+
completion = openai.Completion.create(model="wizardcoder-python-34b-v1.0.Q5_K_M.gguf", prompt=prompt, max_tokens=max_tokens, temperature=temperature, top_p=top_p, top_k=top_k, repetition_penalty=repetition_penalty, stream=True, stop=["</s>", "<|im_end|>"])
|
15 |
for chunk in completion:
|
16 |
yield chunk["choices"][0]["text"]
|
17 |
|
|
|
76 |
with gr.Column():
|
77 |
gr.Markdown(f"""
|
78 |
## This demo is an unquantized GPU chatbot of [WizardCoder-Python-34B-V1.0-GGUF](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGUF)
|
|
|
79 |
""")
|
80 |
with gr.Row():
|
81 |
gr.Markdown("# π WizardCoder-Python-34B-V1.0-GGUF Playground Space! π")
|