Edit app.py
Browse files
app.py
CHANGED
|
@@ -61,13 +61,12 @@ demo = gr.Interface(
|
|
| 61 |
# api_name="predict" # λͺ
μμ μΌλ‘ API μ΄λ¦μ μ€μ νλ©΄ /api/predict μλν¬μΈνΈκ° νμ€ν μμ±λ©λλ€.
|
| 62 |
)
|
| 63 |
|
|
|
|
| 64 |
if __name__ == "__main__":
|
| 65 |
-
print("Launching Gradio app...")
|
| 66 |
-
#
|
| 67 |
-
#
|
| 68 |
-
# server_port=7860μ Gradio κΈ°λ³Έ ν¬νΈ
|
| 69 |
-
# queue() μ¬μ© μ api_open=Trueκ° κΈ°λ³Έκ°μΈ κ²½μ°κ° λ§μ /api/predict μλν¬μΈνΈκ° νμ±νλ κ°λ₯μ±μ΄ λμ
|
| 70 |
demo.queue().launch(server_name="0.0.0.0", server_port=7860)
|
| 71 |
-
#
|
| 72 |
-
|
| 73 |
-
print(f"
|
|
|
|
| 61 |
# api_name="predict" # λͺ
μμ μΌλ‘ API μ΄λ¦μ μ€μ νλ©΄ /api/predict μλν¬μΈνΈκ° νμ€ν μμ±λ©λλ€.
|
| 62 |
)
|
| 63 |
|
| 64 |
+
# ... (μ΄μ λ΅λ³μ μμ λ app.py μ½λ μ 체) ...
|
| 65 |
if __name__ == "__main__":
|
| 66 |
+
print("Launching Gradio app with queue and explicit API exposure...")
|
| 67 |
+
# queue() μ¬μ© μ /api/predict κ° κΈ°λ³Έ μλν¬μΈνΈμΌ κ°λ₯μ±μ΄ λμ
|
| 68 |
+
# λλ api_nameμ λͺ
μμ μΌλ‘ μ€μ :
|
|
|
|
|
|
|
| 69 |
demo.queue().launch(server_name="0.0.0.0", server_port=7860)
|
| 70 |
+
# demo.launch(server_name="0.0.0.0", server_port=7860, api_name="predict") # μ΄λ κ² ν΄λ λ¨
|
| 71 |
+
print(f"Gradio app should be accessible at http://localhost:7860")
|
| 72 |
+
print(f"Try API endpoint for Next.js: http://localhost:7860/api/predict (or as defined by api_name)")
|