Thiloid commited on
Commit
ac37474
·
verified ·
1 Parent(s): 8930148

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -83,7 +83,15 @@ def responsecritical(
83
  )
84
 
85
  system="Bitte evaluiere ob die Frage beleidigend oder auch sensibel ist. Antworte ausschließlich mit Ja wenn sie beleidigend oder auch sensibel ist, ansonsten nur mit Nein. Erkläre deine Entscheidung nicht.\n\nUser-Anliegen:"
86
- formatted_prompt = format_promptc(system+"\n"+prompt)
 
 
 
 
 
 
 
 
87
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
88
  output = ""
89
  for response in stream:
 
83
  )
84
 
85
  system="Bitte evaluiere ob die Frage beleidigend oder auch sensibel ist. Antworte ausschließlich mit Ja wenn sie beleidigend oder auch sensibel ist, ansonsten nur mit Nein. Erkläre deine Entscheidung nicht.\n\nUser-Anliegen:"
86
+ words = prompt.split()
87
+
88
+ # Check if "afd" is in the words list and remove it
89
+ if "afd" in words:
90
+ words.remove("afd")
91
+
92
+ # Join the words back into a sentence
93
+ prompt_sentence = ' '.join(words)
94
+ formatted_prompt = format_promptc(system+"\n"+prompt_sentence)
95
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
96
  output = ""
97
  for response in stream: