dada / app.py
Srinivasulu kethanaboina
Update app.py
3d471c7 verified
raw
history blame
476 Bytes
from flask import Flask, request
import gradio as gr
app = Flask(__name__)
def get_ip():
# Retrieve the client's IP address
client_ip = request.remote_addr
return f"Client IP Address: {client_ip}"
# Define the Gradio interface
interface = gr.Interface(fn=get_ip, inputs=[], outputs="text")
@app.route('/')
def index():
# Launch Gradio interface on the Flask route
return interface.launch(share=True)
if __name__ == '__main__':
app.run(debug=True)