File size: 925 Bytes
d17e7da
 
 
104f494
d17e7da
 
 
 
 
 
 
 
 
 
 
 
104f494
d17e7da
 
f2475e8
57a7522
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import gradio as gr

from prompt import iface_prompt
from chat import iface_chat

with gr.Blocks() as iface:
    gr.Markdown("""# Petals playground
            **Let's play with prompts and inference settings for BLOOM and BLOOMZ 176B models!**

            This space uses websocket API of [chat.petals.ml](http://chat.petals.ml). Health status of Petals network [lives here](http://health.petals.ml).

            Do NOT talk to BLOOM as an entity, it's not a chatbot but a webpage/blog/article completion model.
            For the best results: MIMIC a few sentences of a webpage similar to the content you want to generate.

            BLOOMZ performs better in chat mode and understands the instructions better.""")

    gr.TabbedInterface([iface_prompt, iface_chat], ["Prompt mode", "Chat mode"])

# Queues are required to enable generators
iface.queue(concurrency_count=5, max_size=50)
iface.launch(show_error=True)