Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,10 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from gradio_client import Client
|
3 |
|
|
|
|
|
|
|
4 |
# Initializing Gradio Python Clients for the two Llama chatbots
|
5 |
client_llama3_1 = Client("ysharma/Chat_with_Meta_llama3_1_8b_dupe", hf_token=HF_TOKEN)
|
6 |
client_llama3 = Client("ysharma/Chat_with_Meta_llama3_8b_dupe", hf_token=HF_TOKEN)
|
@@ -57,8 +61,8 @@ def chat_llama3_1(history_llama3_1, temp, max_tokens):
|
|
57 |
|
58 |
|
59 |
# Gradio block
|
60 |
-
chatbot_llama3 = gr.Chatbot(height=450, label='Llama3 8b Chat',
|
61 |
-
chatbot_llama3_1 = gr.Chatbot(height=450, label='Llama3.1 8b Chat',
|
62 |
textbox = gr.Textbox(placeholder="Type your text and press Enter", scale=7, label="User Mesaages")
|
63 |
additional_inputs_accordion = gr.Accordion(label="⚙️ Parameters", open=False, render=False)
|
64 |
temperature = gr.Slider(minimum=0,
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
from gradio_client import Client
|
4 |
|
5 |
+
# Setting up environment variable to access private spaces via Gradio clients
|
6 |
+
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
7 |
+
|
8 |
# Initializing Gradio Python Clients for the two Llama chatbots
|
9 |
client_llama3_1 = Client("ysharma/Chat_with_Meta_llama3_1_8b_dupe", hf_token=HF_TOKEN)
|
10 |
client_llama3 = Client("ysharma/Chat_with_Meta_llama3_8b_dupe", hf_token=HF_TOKEN)
|
|
|
61 |
|
62 |
|
63 |
# Gradio block
|
64 |
+
chatbot_llama3 = gr.Chatbot(height=450, label='Llama3 8b Chat', placeholder=PLACEHOLDER_LLAMA3,)
|
65 |
+
chatbot_llama3_1 = gr.Chatbot(height=450, label='Llama3.1 8b Chat', placeholder=PLACEHOLDER_LLAMA3_1,)
|
66 |
textbox = gr.Textbox(placeholder="Type your text and press Enter", scale=7, label="User Mesaages")
|
67 |
additional_inputs_accordion = gr.Accordion(label="⚙️ Parameters", open=False, render=False)
|
68 |
temperature = gr.Slider(minimum=0,
|