Added persistent character feature

This commit is contained in:
Alen-joy47 2025-04-02 05:20:06 +00:00
parent 89893a7136
commit c60526d988
3 changed files with 34 additions and 1122 deletions

View File

@ -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

View File

@ -1 +1,8 @@
gradio_root = None
# Existing imports
import os
import sys
# Global variable to store the saved character
saved_character = None

1136
webui.py

File diff suppressed because it is too large Load Diff