Commit
·
8e39f6c
1
Parent(s):
b569453
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,10 +14,7 @@ DEFAULT_MAX_NEW_TOKENS = 1024
|
|
| 14 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 15 |
|
| 16 |
DESCRIPTION = """\
|
| 17 |
-
|
| 18 |
-
"""
|
| 19 |
-
|
| 20 |
-
LICENSE = """
|
| 21 |
"""
|
| 22 |
|
| 23 |
if not torch.cuda.is_available():
|
|
@@ -77,23 +74,12 @@ def generate(
|
|
| 77 |
|
| 78 |
chat_interface = gr.ChatInterface(
|
| 79 |
fn=generate,
|
| 80 |
-
additional_inputs=[
|
| 81 |
-
gr.Textbox(label="System prompt", lines=6),
|
| 82 |
-
],
|
| 83 |
stop_btn=None,
|
| 84 |
-
examples=[
|
| 85 |
-
["Hello there! How are you doing?"],
|
| 86 |
-
["Can you explain briefly to me what is the Python programming language?"],
|
| 87 |
-
["Explain the plot of Cinderella in a sentence."],
|
| 88 |
-
["How many hours does it take a man to eat a Helicopter?"],
|
| 89 |
-
["Write a 100-word article on 'Benefits of Open-Source in AI research'"],
|
| 90 |
-
],
|
| 91 |
)
|
| 92 |
|
| 93 |
with gr.Blocks(css="style.css") as demo:
|
| 94 |
gr.Markdown(DESCRIPTION)
|
| 95 |
chat_interface.render()
|
| 96 |
-
gr.Markdown(LICENSE)
|
| 97 |
|
| 98 |
if __name__ == "__main__":
|
| 99 |
demo.queue(max_size=20).launch()
|
|
|
|
| 14 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
| 15 |
|
| 16 |
DESCRIPTION = """\
|
| 17 |
+
Llama. Protected.
|
|
|
|
|
|
|
|
|
|
| 18 |
"""
|
| 19 |
|
| 20 |
if not torch.cuda.is_available():
|
|
|
|
| 74 |
|
| 75 |
chat_interface = gr.ChatInterface(
|
| 76 |
fn=generate,
|
|
|
|
|
|
|
|
|
|
| 77 |
stop_btn=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
with gr.Blocks(css="style.css") as demo:
|
| 81 |
gr.Markdown(DESCRIPTION)
|
| 82 |
chat_interface.render()
|
|
|
|
| 83 |
|
| 84 |
if __name__ == "__main__":
|
| 85 |
demo.queue(max_size=20).launch()
|