Sugamdeol commited on
Commit
2970eac
·
verified ·
1 Parent(s): 4d10a3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- Argument:"""
16
- response = generate_text(prompt)
17
- return response.split("Argument:")[1].strip()
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
- Counterargument:"""
24
- response = generate_text(prompt)
25
- return response.split("Counterargument:")[1].strip()
26
 
27
  def debate_assistant(topic, stance):
28
  argument = generate_argument(topic, stance)
29
  counterargument = generate_counterargument(topic, argument)
30
- return f"Argument: {argument}\n\nCounterargument: {counterargument}"
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(