Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,7 +26,11 @@ LICENSE = """
|
|
| 26 |
As a derivate work of [Llama-2-7b-chat](https://huggingface.co/meta-llama/Llama-2-7b-chat) by Meta,
|
| 27 |
this demo is governed by the original [license](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat/blob/main/LICENSE.txt) and [acceptable use policy](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat/blob/main/USE_POLICY.md).
|
| 28 |
"""
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
if not torch.cuda.is_available():
|
| 31 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 32 |
|
|
@@ -116,10 +120,12 @@ chat_interface = gr.ChatInterface(
|
|
| 116 |
with gr.Blocks(css="style.css") as demo:
|
| 117 |
gr.Markdown(DESCRIPTION)
|
| 118 |
chat_interface.render()
|
|
|
|
| 119 |
gr.Markdown(LICENSE)
|
| 120 |
|
| 121 |
if __name__ == "__main__":
|
| 122 |
-
demo.
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
|
|
|
|
| 26 |
As a derivate work of [Llama-2-7b-chat](https://huggingface.co/meta-llama/Llama-2-7b-chat) by Meta,
|
| 27 |
this demo is governed by the original [license](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat/blob/main/LICENSE.txt) and [acceptable use policy](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat/blob/main/USE_POLICY.md).
|
| 28 |
"""
|
| 29 |
+
EXAMPLES = """
|
| 30 |
+
<p/>
|
| 31 |
+
---
|
| 32 |
+
Keep in mind that the examples are cached.
|
| 33 |
+
"""
|
| 34 |
if not torch.cuda.is_available():
|
| 35 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 36 |
|
|
|
|
| 120 |
with gr.Blocks(css="style.css") as demo:
|
| 121 |
gr.Markdown(DESCRIPTION)
|
| 122 |
chat_interface.render()
|
| 123 |
+
gr.Markdown(EXAMPLES)
|
| 124 |
gr.Markdown(LICENSE)
|
| 125 |
|
| 126 |
if __name__ == "__main__":
|
| 127 |
+
demo.queue(max_size=20)
|
| 128 |
+
demo.launch(share=True)
|
| 129 |
|
| 130 |
|
| 131 |
|