Spaces:
Runtime error
Runtime error
Change the LLM to LLama3
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
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 |
"""
|
7 |
-
client = InferenceClient("
|
8 |
|
9 |
|
10 |
def respond(
|
@@ -42,33 +42,16 @@ def respond(
|
|
42 |
"""
|
43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
44 |
"""
|
45 |
-
with gr.Blocks() as demo:
|
46 |
-
with gr.Row() as row:
|
47 |
-
|
48 |
-
with gr.Column():
|
49 |
-
|
50 |
-
gr.ChatInterface(
|
51 |
-
respond,
|
52 |
-
textbox1=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
|
53 |
-
chatbot1=gr.Chatbot(height=400),
|
54 |
-
additional_inputs=[
|
55 |
-
gr.Textbox("You are helpful AI", label="System Prompt"),
|
56 |
-
gr.Slider(500,4000, label="Max New Tokens"),
|
57 |
-
gr.Slider(0,1, label="Temperature", value= 0.7)
|
58 |
-
]
|
59 |
-
)
|
60 |
-
with gr.Column():
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
if __name__ == "__main__":
|
74 |
demo.launch()
|
|
|
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 |
"""
|
7 |
+
client = InferenceClient("meta-llama/Meta-Llama-3-8B")
|
8 |
|
9 |
|
10 |
def respond(
|
|
|
42 |
"""
|
43 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
44 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
demo = gr.ChatInterface(
|
47 |
+
respond,
|
48 |
+
textbox1=gr.Textbox(placeholder="Enter message here", container=False, scale = 7),
|
49 |
+
chatbot1=gr.Chatbot(height=400),
|
50 |
+
additional_inputs=[
|
51 |
+
gr.Textbox("You are helpful AI", label="System Prompt"),
|
52 |
+
gr.Slider(500,4000, label="Max New Tokens"),
|
53 |
+
gr.Slider(0,1, label="Temperature", value= 0.7)
|
54 |
+
]
|
55 |
+
)
|
|
|
56 |
if __name__ == "__main__":
|
57 |
demo.launch()
|