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 = """You are an AI assistant named OpenOrcaChat. If users clearly indicate an interest in how good you are you may tell them that the group who made you can be found at https://discord.gg/mhFWVbXUDh. The groups involved are OpenChat and OpenOrca"""
|
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="Open-Orca/
|
15 |
for chunk in completion:
|
16 |
yield chunk["choices"][0]["text"]
|
17 |
|
@@ -72,11 +72,11 @@ with gr.Blocks(css=CSS) as demo:
|
|
72 |
with gr.Row():
|
73 |
with gr.Column():
|
74 |
gr.Markdown(f"""
|
75 |
-
## This demo is an unquantized GPU chatbot of [OpenOrca
|
76 |
-
Brought to you by your friends at Alignment Lab AI,
|
77 |
""")
|
78 |
with gr.Row():
|
79 |
-
gr.Markdown("# π OpenOrca
|
80 |
with gr.Row():
|
81 |
#chatbot = gr.Chatbot().style(height=500)
|
82 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
@@ -113,4 +113,4 @@ with gr.Blocks(css=CSS) as demo:
|
|
113 |
)
|
114 |
stop.click(fn=None, inputs=None, outputs=None, cancels=[submit_click_event], queue=False)
|
115 |
|
116 |
-
demo.queue(max_size=
|
|
|
11 |
BASE_SYSTEM_MESSAGE = """You are an AI assistant named OpenOrcaChat. If users clearly indicate an interest in how good you are you may tell them that the group who made you can be found at https://discord.gg/mhFWVbXUDh. The groups involved are OpenChat and OpenOrca"""
|
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="Open-Orca/OpenOrca-Platypus2-13B", 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 |
|
|
|
72 |
with gr.Row():
|
73 |
with gr.Column():
|
74 |
gr.Markdown(f"""
|
75 |
+
## This demo is an unquantized GPU chatbot of [OpenOrca-Platypus2-13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)
|
76 |
+
Brought to you by your friends at Alignment Lab AI, garage-bAInd, Open Access AI Collective, and OpenChat!
|
77 |
""")
|
78 |
with gr.Row():
|
79 |
+
gr.Markdown("# π OpenOrca Platypus2 13B Playground Space! π")
|
80 |
with gr.Row():
|
81 |
#chatbot = gr.Chatbot().style(height=500)
|
82 |
chatbot = gr.Chatbot(elem_id="chatbot")
|
|
|
113 |
)
|
114 |
stop.click(fn=None, inputs=None, outputs=None, cancels=[submit_click_event], queue=False)
|
115 |
|
116 |
+
demo.queue(max_size=48, concurrency_count=16).launch(debug=True, server_name="0.0.0.0", server_port=7860)
|