CreitinGameplays commited on
Commit
ea47071
1 Parent(s): 7984171

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -35,7 +35,9 @@ def generate_text(user_prompt):
35
 
36
  # Extract the assistant's response (assuming it starts with "<|assistant|>")
37
  assistant_response = generated_text.split("<|assistant|>")[-1]
38
-
 
 
39
  return assistant_response
40
 
41
  # Define the Gradio interface
 
35
 
36
  # Extract the assistant's response (assuming it starts with "<|assistant|>")
37
  assistant_response = generated_text.split("<|assistant|>")[-1]
38
+ assistant_response = assistant_response.replace(f"{prompt}", "").strip()
39
+ assistant_response = assistant_response.replace("You are a helpful AI assistant.", "").strip()
40
+
41
  return assistant_response
42
 
43
  # Define the Gradio interface