Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -182,11 +182,12 @@ async def get_frontend_file(filename: str):
|
|
| 182 |
# ---------------------------------------------------------
|
| 183 |
# ZeroGPU REQUIRES a Gradio app to exist, so we mount a dummy one.
|
| 184 |
@spaces.GPU(duration=120)
|
| 185 |
-
def dummy_gpu_task():
|
| 186 |
-
|
| 187 |
|
| 188 |
demo = gr.Interface(fn=dummy_gpu_task, inputs="text", outputs="text")
|
| 189 |
app = gr.mount_gradio_app(app, demo, path="/dummy_gradio")
|
| 190 |
|
| 191 |
-
|
| 192 |
-
|
|
|
|
|
|
| 182 |
# ---------------------------------------------------------
|
| 183 |
# ZeroGPU REQUIRES a Gradio app to exist, so we mount a dummy one.
|
| 184 |
@spaces.GPU(duration=120)
|
| 185 |
+
def dummy_gpu_task(*args, **kwargs):
|
| 186 |
+
return "dummy"
|
| 187 |
|
| 188 |
demo = gr.Interface(fn=dummy_gpu_task, inputs="text", outputs="text")
|
| 189 |
app = gr.mount_gradio_app(app, demo, path="/dummy_gradio")
|
| 190 |
|
| 191 |
+
if __name__ == "__main__":
|
| 192 |
+
import uvicorn
|
| 193 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|