mecoffey commited on
Commit
bf5afa9
·
1 Parent(s): c889750
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -39,9 +39,9 @@ ick_traits = ''
39
  def char_description(prompt):
40
 
41
  prompt1 = f"{DESC_SYSTEM_PROMPT}\n\nCharacter Description: {prompt}\n\nDescribe:"
42
- output1 = pipe(prompt1, return_full_text=False, max_new_tokens=256)
43
  prompt2 = f"{BACK_SYSTEM_PROMPT}\n\n{output1}\n\nUser prompt: {prompt}\n\nDescribe:"
44
- output2 = pipe(prompt2, return_full_text=False, max_new_tokens=256)
45
  global strength
46
  strength = random.randint[2,12]
47
  global dexterity
@@ -76,9 +76,9 @@ def rand_char_description():
76
  races = input_file.readline()
77
  rand_race = random.choice(races)
78
  prompt1 = f"{DESC_SYSTEM_PROMPT}\n\nCharacter Description: {rand_race}\n\nDescribe:"
79
- output1 = pipe(prompt1, return_full_text=False, max_new_tokens=256)
80
  prompt2 = f"{BACK_SYSTEM_PROMPT}\n\n{output1}\n\nUser prompt: {rand_race}\n\nDescribe:"
81
- output2 = pipe(prompt2, return_full_text=False, max_new_tokens=256)
82
  global strength
83
  strength = random.randint[2,12]
84
  global dexterity
@@ -124,9 +124,9 @@ with gr.Blocks() as demo:
124
 
125
 
126
  with gr.Column(scale = 0):
127
- ac = gr.Textbox(value = lambda:random.randint(3,20), label = "AC", interactive = False)
128
- speed = gr.Textbox(value = lambda:random.randint(10,30), label = "HP", interactive = False)
129
- speed = gr.Textbox(value = lambda:"25 ft", label = "Speed", interactive = False)
130
 
131
 
132
  with gr.Row():
 
39
  def char_description(prompt):
40
 
41
  prompt1 = f"{DESC_SYSTEM_PROMPT}\n\nCharacter Description: {prompt}\n\nDescribe:"
42
+ output1 = pipe(prompt1, return_full_text=False)
43
  prompt2 = f"{BACK_SYSTEM_PROMPT}\n\n{output1}\n\nUser prompt: {prompt}\n\nDescribe:"
44
+ output2 = pipe(prompt2, return_full_text=False)
45
  global strength
46
  strength = random.randint[2,12]
47
  global dexterity
 
76
  races = input_file.readline()
77
  rand_race = random.choice(races)
78
  prompt1 = f"{DESC_SYSTEM_PROMPT}\n\nCharacter Description: {rand_race}\n\nDescribe:"
79
+ output1 = pipe(prompt1, return_full_text=False)
80
  prompt2 = f"{BACK_SYSTEM_PROMPT}\n\n{output1}\n\nUser prompt: {rand_race}\n\nDescribe:"
81
+ output2 = pipe(prompt2, return_full_text=False)
82
  global strength
83
  strength = random.randint[2,12]
84
  global dexterity
 
124
 
125
 
126
  with gr.Column(scale = 0):
127
+ ac_box = gr.Textbox(value = ac, label = "AC", interactive = False)
128
+ hp_box = gr.Textbox(value = hp, label = "HP", interactive = False)
129
+ speed_box = gr.Textbox(value = "25 ft", label = "Speed", interactive = False)
130
 
131
 
132
  with gr.Row():