Spaces:
Runtime error
Runtime error
Delete app.py
Browse files
app.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
from fastapi import FastAPI
|
2 |
-
import gradio as gr
|
3 |
-
|
4 |
-
app = FastAPI()
|
5 |
-
|
6 |
-
@app.get("/")
|
7 |
-
def read_root():
|
8 |
-
return {"message": "Hello, Perplexica!"}
|
9 |
-
|
10 |
-
@app.get("/api/test")
|
11 |
-
def test_api():
|
12 |
-
return {"status": "success", "data": "This is a test API"}
|
13 |
-
|
14 |
-
# Gradio UI
|
15 |
-
def greet(name):
|
16 |
-
return f"你好, {name}!"
|
17 |
-
|
18 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
19 |
-
|
20 |
-
if __name__ == "__main__":
|
21 |
-
demo.launch(server_name="0.0.0.0", server_port=8000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|