Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,24 +11,22 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
11 |
|
12 |
DESCRIPTION = '''
|
13 |
<div>
|
14 |
-
<h1 style="text-align: center;">
|
15 |
-
<p>
|
16 |
-
<p>π For more details about the Llama3 release and how to use the model with <code>transformers</code>, take a look <a href="https://huggingface.co/blog/llama3">at our blog post</a>.</p>
|
17 |
-
<p>π¦ Looking for an even more powerful model? Check out the <a href="https://huggingface.co/chat/"><b>Hugging Chat</b></a> integration for Meta Llama 3 70b</p>
|
18 |
</div>
|
19 |
'''
|
20 |
|
21 |
-
LICENSE = """
|
22 |
-
<p/>
|
23 |
-
---
|
24 |
-
Built with Meta Llama 3
|
25 |
-
"""
|
26 |
|
27 |
PLACEHOLDER = """
|
28 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
29 |
<img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/8e75e61cc9bab22b7ce3dec85ab0e6db1da5d107/Meta_lockup_positive%20primary_RGB.jpg" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; ">
|
30 |
-
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">
|
31 |
-
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Ask me
|
32 |
</div>
|
33 |
"""
|
34 |
|
@@ -117,7 +115,7 @@ chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Gradio ChatInterf
|
|
117 |
with gr.Blocks(fill_height=True, css=css) as demo:
|
118 |
|
119 |
gr.Markdown(DESCRIPTION)
|
120 |
-
gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
121 |
gr.ChatInterface(
|
122 |
fn=chat_llama3_8b,
|
123 |
chatbot=chatbot,
|
@@ -138,15 +136,14 @@ with gr.Blocks(fill_height=True, css=css) as demo:
|
|
138 |
render=False ),
|
139 |
],
|
140 |
examples=[
|
141 |
-
['
|
142 |
-
['
|
143 |
-
['
|
144 |
-
['Justify why a penguin might make a good king of the jungle.']
|
145 |
],
|
146 |
cache_examples=False,
|
147 |
)
|
148 |
|
149 |
-
gr.Markdown(LICENSE)
|
150 |
|
151 |
if __name__ == "__main__":
|
152 |
demo.launch()
|
|
|
11 |
|
12 |
DESCRIPTION = '''
|
13 |
<div>
|
14 |
+
<h1 style="text-align: center;">HugCode</h1>
|
15 |
+
<p>CodeLLaMA sfted on [HugCode](https://huggingface.co/datasets/nuojohnchen/hugcode-codesft) data. Made in 2023.9. <a href="https://huggingface.co/FreedomIntelligence/Apollo-7B"><b>Meta Llama3 8b Chat</b></a></p>
|
|
|
|
|
16 |
</div>
|
17 |
'''
|
18 |
|
19 |
+
# LICENSE = """
|
20 |
+
# <p/>
|
21 |
+
# ---
|
22 |
+
# Built with Meta Llama 3
|
23 |
+
# """
|
24 |
|
25 |
PLACEHOLDER = """
|
26 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
27 |
<img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/8e75e61cc9bab22b7ce3dec85ab0e6db1da5d107/Meta_lockup_positive%20primary_RGB.jpg" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; ">
|
28 |
+
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">HugCode</h1>
|
29 |
+
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Ask me code questions (English/Chinese).</p>
|
30 |
</div>
|
31 |
"""
|
32 |
|
|
|
115 |
with gr.Blocks(fill_height=True, css=css) as demo:
|
116 |
|
117 |
gr.Markdown(DESCRIPTION)
|
118 |
+
# gr.DuplicateButton(value="Duplicate Space for private use", elem_id="duplicate-button")
|
119 |
gr.ChatInterface(
|
120 |
fn=chat_llama3_8b,
|
121 |
chatbot=chatbot,
|
|
|
136 |
render=False ),
|
137 |
],
|
138 |
examples=[
|
139 |
+
['Build a REST API that allows users to manage their to-do lists.'],
|
140 |
+
['Implement a machine learning model to predict stock prices based on historical data.'],
|
141 |
+
['Develop a web application that allows users to upload images and apply various filters.']
|
|
|
142 |
],
|
143 |
cache_examples=False,
|
144 |
)
|
145 |
|
146 |
+
# gr.Markdown(LICENSE)
|
147 |
|
148 |
if __name__ == "__main__":
|
149 |
demo.launch()
|