Rooni commited on
Commit
c52842d
1 Parent(s): 9bc6c6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -25
app.py CHANGED
@@ -122,31 +122,6 @@ def get_data(text):
122
  return results
123
 
124
 
125
- def send_to_txt2img(image):
126
-
127
- result = {tabs: gr.update(selected="t2i")}
128
-
129
- try:
130
- text = image.info['parameters']
131
- data = get_data(text)
132
- result[prompt] = gr.update(value=data['prompt'])
133
- result[negative_prompt] = gr.update(value=data['negative_prompt']) if data['negative_prompt'] is not None else gr.update()
134
- result[steps] = gr.update(value=int(data['steps'])) if data['steps'] is not None else gr.update()
135
- result[seed] = gr.update(value=int(data['seed'])) if data['seed'] is not None else gr.update()
136
- result[cfg_scale] = gr.update(value=float(data['cfg_scale'])) if data['cfg_scale'] is not None else gr.update()
137
- result[width] = gr.update(value=int(data['w'])) if data['w'] is not None else gr.update()
138
- result[height] = gr.update(value=int(data['h'])) if data['h'] is not None else gr.update()
139
- result[sampler] = gr.update(value=data['sampler']) if data['sampler'] is not None else gr.update()
140
- if model in model_names:
141
- result[model] = gr.update(value=model_names[model])
142
- else:
143
- result[model] = gr.update()
144
- return result
145
-
146
- except Exception as e:
147
- print(e)
148
-
149
- return result
150
 
151
 
152
  prodia_client = Prodia(api_key=os.getenv("PRODIA_API_KEY"))
 
122
  return results
123
 
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
 
127
  prodia_client = Prodia(api_key=os.getenv("PRODIA_API_KEY"))