Update hf_demo.py
Browse files- hf_demo.py +1 -8
hf_demo.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
# hf_demo.py – ARF v4 API with Memory
|
| 2 |
-
import os
|
| 3 |
-
import uvicorn
|
| 4 |
from fastapi import FastAPI, HTTPException
|
| 5 |
from fastapi.middleware.cors import CORSMiddleware
|
| 6 |
import gradio as gr
|
|
@@ -102,9 +100,4 @@ iface = gr.Interface(
|
|
| 102 |
outputs="text",
|
| 103 |
title="ARF v4 Demo"
|
| 104 |
)
|
| 105 |
-
app = gr.mount_gradio_app(app, iface, path="/")
|
| 106 |
-
|
| 107 |
-
# ============== MAIN ENTRY POINT ==============
|
| 108 |
-
if __name__ == "__main__":
|
| 109 |
-
port = int(os.environ.get('PORT', 7860))
|
| 110 |
-
uvicorn.run(app, host="0.0.0.0", port=port)
|
|
|
|
| 1 |
# hf_demo.py – ARF v4 API with Memory
|
|
|
|
|
|
|
| 2 |
from fastapi import FastAPI, HTTPException
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
import gradio as gr
|
|
|
|
| 100 |
outputs="text",
|
| 101 |
title="ARF v4 Demo"
|
| 102 |
)
|
| 103 |
+
app = gr.mount_gradio_app(app, iface, path="/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|