Nick088 commited on
Commit
8caf209
1 Parent(s): df9cd88
Files changed (1) hide show
  1. app.py +11 -14
app.py CHANGED
@@ -59,17 +59,6 @@ def generate(
59
  better_prompt = tokenizer.decode(outputs[0])
60
  return better_prompt
61
 
62
- random_seed = gr.Checkbox(value=False, label="Use Random Seed", info="Check to use a random seed for the generation process")
63
-
64
- manual_seed = gr.Number(value=42, interactive=True, label="Seed", info="A starting point to initiate the generation process")
65
-
66
- def select_seed(random_seed):
67
- if random_seed:
68
- return gr.Number(value=42, interactive=True, label="Seed", info="A starting point to initiate the generation process", visible=False)
69
- else:
70
- return gr.Number(value=42, interactive=True, label="Seed", info="A starting point to initiate the generation process", visible=True)
71
-
72
-
73
 
74
  additional_inputs = [
75
  gr.Slider(
@@ -117,8 +106,17 @@ additional_inputs = [
117
  label="Top K",
118
  info="Higher k means more diverse outputs by considering a range of tokens",
119
  ),
120
- random_seed,
121
- manual_seed,
 
 
 
 
 
 
 
 
 
122
  gr.Radio(
123
  choices=["fp32", "fp16"],
124
  value="fp16",
@@ -127,7 +125,6 @@ additional_inputs = [
127
  ),
128
  ]
129
 
130
- random_seed.change(fn=select_seed, inputs=random_seed, outputs=manual_seed)
131
 
132
  examples = [
133
  [
 
59
  better_prompt = tokenizer.decode(outputs[0])
60
  return better_prompt
61
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  additional_inputs = [
64
  gr.Slider(
 
106
  label="Top K",
107
  info="Higher k means more diverse outputs by considering a range of tokens",
108
  ),
109
+ gr.Checkbox(
110
+ value=False,
111
+ label="Use Random Seed",
112
+ info="Check to use a random seed which is a start point for the generation process",
113
+ ),
114
+ gr.Number(
115
+ value=42,
116
+ interactive=True,
117
+ label="Manual Seed",
118
+ info="A starting point to initiate the generation process"
119
+ ),
120
  gr.Radio(
121
  choices=["fp32", "fp16"],
122
  value="fp16",
 
125
  ),
126
  ]
127
 
 
128
 
129
  examples = [
130
  [