Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
-
|
| 4 |
"""
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 6 |
"""
|
|
@@ -57,7 +57,10 @@ demo = gr.ChatInterface(
|
|
| 57 |
),
|
| 58 |
],
|
| 59 |
)
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
-
demo.launch()
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
+
from keep_alive import keep_alive
|
| 4 |
"""
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 6 |
"""
|
|
|
|
| 57 |
),
|
| 58 |
],
|
| 59 |
)
|
| 60 |
+
def main():
|
| 61 |
+
urls = ['網址1', '網址2', '網址3'] # 替換為你的多個網址
|
| 62 |
+
keep_alive(urls)
|
| 63 |
|
| 64 |
if __name__ == "__main__":
|
| 65 |
+
demo.launch()
|
| 66 |
+
main()
|