File size: 1,073 Bytes
ed79e96
 
 
96398c2
 
01911c9
2fcf433
 
 
 
01911c9
96398c2
01911c9
 
 
 
 
 
 
 
 
ed79e96
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
from huggingface_hub import InferenceClient

def random_response(message, history):
    return random.choice(["Yes", "No"])

with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral")) as demo: # Using Soft theme with adjusted hues for a refined look
    gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test">
               <img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fzelk12%2FChat_interface_test&countColor=%23263759" />
               </a>""")
  
    gr.ChatInterface(random_response,
                    multimodal=True,
                    type="messages",
                    textbox=gr.MultimodalTextbox(),
                    editable=True,
                    title="Chat interface test",
                    save_history=True,
                    )
    gr.Textbox(label="System instructions",)
    gr.Slider(label="temperature",)

if __name__ == "__main__":
    demo.launch()