Spaces:
Runtime error
Runtime error
Srinivasulu kethanaboina commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ from fastapi import FastAPI, Request
|
|
| 2 |
import logging
|
| 3 |
import gradio as gr
|
| 4 |
from threading import Thread
|
| 5 |
-
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
@app.get("/")
|
|
@@ -10,11 +10,12 @@ async def read_root(request: Request):
|
|
| 10 |
client_ip = request.client.host
|
| 11 |
logging.info(f'Client IP Address: {client_ip}')
|
| 12 |
print(client_ip)
|
|
|
|
| 13 |
return {"Client IP Address": client_ip}
|
| 14 |
|
| 15 |
def gradio_interface():
|
| 16 |
def greet(name):
|
| 17 |
-
return f"Hello {name}!"
|
| 18 |
|
| 19 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 20 |
iface.launch()
|
|
|
|
| 2 |
import logging
|
| 3 |
import gradio as gr
|
| 4 |
from threading import Thread
|
| 5 |
+
my=""
|
| 6 |
app = FastAPI()
|
| 7 |
|
| 8 |
@app.get("/")
|
|
|
|
| 10 |
client_ip = request.client.host
|
| 11 |
logging.info(f'Client IP Address: {client_ip}')
|
| 12 |
print(client_ip)
|
| 13 |
+
my=str(client_ip)
|
| 14 |
return {"Client IP Address": client_ip}
|
| 15 |
|
| 16 |
def gradio_interface():
|
| 17 |
def greet(name):
|
| 18 |
+
return f"Hello {name}!{my}"
|
| 19 |
|
| 20 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 21 |
iface.launch()
|