Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,22 +12,22 @@ def generate_argument(topic, stance):
|
|
12 |
prompt = f"""Generate a compelling argument for the following debate topic.
|
13 |
Topic: {topic}
|
14 |
Stance: {stance}
|
15 |
-
|
16 |
-
|
17 |
-
return
|
18 |
|
19 |
def generate_counterargument(topic, original_argument):
|
20 |
prompt = f"""Generate a strong counterargument for the following debate topic and argument.
|
21 |
Topic: {topic}
|
22 |
Original Argument: {original_argument}
|
23 |
-
|
24 |
-
|
25 |
-
return
|
26 |
|
27 |
def debate_assistant(topic, stance):
|
28 |
argument = generate_argument(topic, stance)
|
29 |
counterargument = generate_counterargument(topic, argument)
|
30 |
-
return f"Argument
|
31 |
|
32 |
# Create the Gradio interface
|
33 |
iface = gr.Interface(
|
|
|
12 |
prompt = f"""Generate a compelling argument for the following debate topic.
|
13 |
Topic: {topic}
|
14 |
Stance: {stance}
|
15 |
+
|
16 |
+
Your response should be a well-structured argument supporting the given stance on the topic."""
|
17 |
+
return generate_text(prompt)
|
18 |
|
19 |
def generate_counterargument(topic, original_argument):
|
20 |
prompt = f"""Generate a strong counterargument for the following debate topic and argument.
|
21 |
Topic: {topic}
|
22 |
Original Argument: {original_argument}
|
23 |
+
|
24 |
+
Your response should be a well-structured counterargument addressing the points made in the original argument."""
|
25 |
+
return generate_text(prompt)
|
26 |
|
27 |
def debate_assistant(topic, stance):
|
28 |
argument = generate_argument(topic, stance)
|
29 |
counterargument = generate_counterargument(topic, argument)
|
30 |
+
return f"Argument:\n{argument}\n\nCounterargument:\n{counterargument}"
|
31 |
|
32 |
# Create the Gradio interface
|
33 |
iface = gr.Interface(
|