File size: 689 Bytes
c36c5f2
 
52214c5
 
 
 
c36c5f2
52214c5
 
c36c5f2
 
52214c5
 
 
 
 
c36c5f2
52214c5
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

# Mock LLM function for demonstration. Replace this with your actual LLM call.
def ask_llm(question):
    # Here you would normally interact with an LLM. For demonstration, we'll just echo the question.
    return f"LLM Response: {question}"

def chat_with_llm(user_input):
    return ask_llm(user_input)

# Create the Gradio interface
iface = gr.Interface(fn=chat_with_llm,
                     inputs=gr.inputs.Textbox(lines=2, placeholder="Ask me anything!"),
                     outputs="text",
                     title="Chat with LLM",
                     description="Type your question below and get responses from an LLM.")

# Launch the app
iface.launch()