Gradio-API-Test / app.py
KiraPGR's picture
Update app.py
5321d4b verified
raw
history blame
550 Bytes
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))
return text+text2
interface = gr.ChatInterface(echo)
with gr.Blocks() as demo:
gr.Markdown("""
# Just a test...
""")
with gr.Row(visible=False):
interface.render()
demo.queue().launch()