Spaces:
Runtime error
Runtime error
File size: 758 Bytes
ff74699 d32eca6 ff74699 a694c72 ff74699 fdb1c1b a694c72 ff74699 1534ee5 |
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 26 |
import gradio as gr
import os
import gradio as gr
from gradio import ChatInterface
import time
def echo(text, text2, request: gr.Request):
if request:
print("Request headers dictionary:", request.headers)
print("IP address:", request.client.host)
print("Query parameters:", dict(request.query_params))
print(text,text2)
return text+text2
# Define the inputs and outputs for your interface
inputs = [
gr.inputs.Textbox(lines=2, placeholder="Enter your message here..."),
gr.inputs.Textbox(lines=2, placeholder="Enter additional parameter here...")
]
outputs = gr.outputs.Textbox()
# Create the interface
interface = gr.Interface(fn=echo, inputs=inputs, outputs=outputs)
# Launch the interface
interface.launch() |