Added persistent character feature
This commit is contained in:
parent
89893a7136
commit
c60526d988
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
import shared # Import the shared file to access the saved character
|
||||
|
||||
def expand_prompt(prompt):
|
||||
"""Modify the prompt to always include the saved character"""
|
||||
|
||||
# Check if a character is saved
|
||||
if shared.saved_character:
|
||||
prompt = f"{shared.saved_character}, {prompt}" # Append saved character to prompt
|
||||
|
||||
return prompt
|
||||
|
|
@ -1 +1,8 @@
|
|||
gradio_root = None
|
||||
|
||||
# Existing imports
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Global variable to store the saved character
|
||||
saved_character = None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue