Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,12 +7,13 @@ client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
|
|
7 |
|
8 |
# Debate response function
|
9 |
def debate_respond(message, history: list[tuple[str, str]],
|
10 |
-
max_tokens=
|
11 |
# System message defining assistant behavior in a debate
|
12 |
system_message = {
|
13 |
"role": "system",
|
14 |
-
"content": f"
|
15 |
-
f"
|
|
|
16 |
}
|
17 |
|
18 |
messages = [system_message]
|
@@ -49,7 +50,7 @@ def encode_image(image_path):
|
|
49 |
global topic, position
|
50 |
with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Roboto Mono")]),
|
51 |
css='footer {visibility: hidden}') as demo:
|
52 |
-
gr.Markdown("#
|
53 |
with gr.Tabs():
|
54 |
with gr.TabItem("Debate Interface"):
|
55 |
with gr.Row():
|
|
|
7 |
|
8 |
# Debate response function
|
9 |
def debate_respond(message, history: list[tuple[str, str]],
|
10 |
+
max_tokens=512, temperature=0.4, top_p=0.95):
|
11 |
# System message defining assistant behavior in a debate
|
12 |
system_message = {
|
13 |
"role": "system",
|
14 |
+
"content": f"You are a debate participant tasked with defending the position '{position.value}' on the topic '{topic.value}'. Your goal is to articulate your arguments with clarity, logic, and professionalism while addressing counterpoints made by the opposing side. Ensure that your responses are thoughtful, evidence-based, and persuasive."
|
15 |
+
f"During the debate, if the user presents arguments challenging your stance, analyze their points critically and provide respectful but firm counterarguments. Avoid dismissive language and focus on strengthening your case through logical reasoning, data, and examples relevant to the topic."
|
16 |
+
f"Stay consistent with your assigned position ('{position.value}'), even if the opposing arguments are strong. Your role is not to concede but to present a compelling case for your stance. Keep the tone respectful and formal throughout the discussion, fostering a constructive and engaging debate environment."
|
17 |
}
|
18 |
|
19 |
messages = [system_message]
|
|
|
50 |
global topic, position
|
51 |
with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Roboto Mono")]),
|
52 |
css='footer {visibility: hidden}') as demo:
|
53 |
+
gr.Markdown("# Welcome to The Debate_Master 🗣️🤖")
|
54 |
with gr.Tabs():
|
55 |
with gr.TabItem("Debate Interface"):
|
56 |
with gr.Row():
|