Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ class ChatBot:
|
|
16 |
def __init__(self):
|
17 |
# Initialize embeddings
|
18 |
self.embeddings = TogetherEmbeddings(
|
19 |
-
model="togethercomputer/m2-bert-80M-
|
20 |
together_api_key=TOGETHER_API_KEY
|
21 |
)
|
22 |
|
@@ -31,9 +31,9 @@ class ChatBot:
|
|
31 |
# Initialize the model
|
32 |
self.model = Together(
|
33 |
model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
34 |
-
temperature=0.
|
35 |
-
max_tokens=
|
36 |
-
top_k=
|
37 |
together_api_key=TOGETHER_API_KEY
|
38 |
)
|
39 |
|
@@ -112,8 +112,8 @@ def create_demo() -> gr.Interface:
|
|
112 |
chatbot = ChatBot()
|
113 |
|
114 |
with gr.Blocks() as demo:
|
115 |
-
gr.Markdown("""#
|
116 |
-
|
117 |
|
118 |
chatbot_interface = gr.Chatbot(
|
119 |
height=600,
|
@@ -123,12 +123,12 @@ def create_demo() -> gr.Interface:
|
|
123 |
with gr.Row():
|
124 |
msg = gr.Textbox(
|
125 |
show_label=False,
|
126 |
-
placeholder="
|
127 |
container=False
|
128 |
)
|
129 |
-
submit = gr.Button("
|
130 |
|
131 |
-
clear = gr.Button("
|
132 |
|
133 |
def respond(message, chat_history):
|
134 |
# Foydalanuvchi xabarini tozalash
|
|
|
16 |
def __init__(self):
|
17 |
# Initialize embeddings
|
18 |
self.embeddings = TogetherEmbeddings(
|
19 |
+
model="togethercomputer/m2-bert-80M-32k-retrieval",
|
20 |
together_api_key=TOGETHER_API_KEY
|
21 |
)
|
22 |
|
|
|
31 |
# Initialize the model
|
32 |
self.model = Together(
|
33 |
model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
34 |
+
temperature=0.7,
|
35 |
+
max_tokens=256,
|
36 |
+
top_k=50,
|
37 |
together_api_key=TOGETHER_API_KEY
|
38 |
)
|
39 |
|
|
|
112 |
chatbot = ChatBot()
|
113 |
|
114 |
with gr.Blocks() as demo:
|
115 |
+
gr.Markdown("""# RAG Chatbot
|
116 |
+
Beeline Uzbekistanning jismoniy shaxslar uchun tariflari haqida ma'lumotlar beruvchi bot""")
|
117 |
|
118 |
chatbot_interface = gr.Chatbot(
|
119 |
height=600,
|
|
|
123 |
with gr.Row():
|
124 |
msg = gr.Textbox(
|
125 |
show_label=False,
|
126 |
+
placeholder="Xabaringizni shu yerda yozing",
|
127 |
container=False
|
128 |
)
|
129 |
+
submit = gr.Button("Xabarni yuborish", variant="primary")
|
130 |
|
131 |
+
clear = gr.Button("Yangi suhbat")
|
132 |
|
133 |
def respond(message, chat_history):
|
134 |
# Foydalanuvchi xabarini tozalash
|