gururise commited on
Commit
d622f83
·
1 Parent(s): a100dd2

update for huggingface spaces

Browse files
Files changed (1) hide show
  1. app.py +22 -26
app.py CHANGED
@@ -140,29 +140,25 @@ Label:''', 1, 2, 0.2, 1.0, 1.0, "\\n,</s>"]
140
  ]
141
 
142
 
143
- def main():
144
- iface = gr.Interface(
145
- fn=infer,
146
- allow_flagging="never",
147
- inputs=[
148
- gr.Textbox(lines=20), # prompt
149
- gr.Slider(0, 256, value=1), #min_length
150
- gr.Slider(1, 384, value=20), # max_tokens
151
- gr.Slider(0.0, 1.0, value=0.2), # temperature
152
- gr.Slider(0.0, 1.0, value=0.9), # top_p
153
- gr.Slider(0.9, 3.0, value=1.0), # repetition penalty
154
- gr.Textbox(lines=1, value="\\n,</s>") # stop
155
- ],
156
- outputs=[gr.Textbox(lines=7, label="BLOOM OUTPUT:"), gr.Textbox(lines=7,label="BLOOMZ OUTPUT:")],
157
-
158
- examples=examples,
159
- cache_examples=True,
160
- title="BLOOM vs BLOOMZ",
161
- description='''<p>Compare outputs of the BLOOM and BLOOMZ 176 billion parameter models using the [Petals](https://petals.ml/) network. Please consider joining the Petals network to help speed up inference.</p><p>Big thanks to [RFTCapital](https://www.rftcapital.com) for providing initial compute resources.</p>'''
162
- )
163
-
164
- iface.launch(debug=True, share=False)
165
-
166
-
167
- if __name__ == '__main__':
168
- main()
 
140
  ]
141
 
142
 
143
+
144
+ iface = gr.Interface(
145
+ fn=infer,
146
+ allow_flagging="never",
147
+ inputs=[
148
+ gr.Textbox(lines=20), # prompt
149
+ gr.Slider(0, 256, value=1), #min_length
150
+ gr.Slider(1, 384, value=20), # max_tokens
151
+ gr.Slider(0.0, 1.0, value=0.2), # temperature
152
+ gr.Slider(0.0, 1.0, value=0.9), # top_p
153
+ gr.Slider(0.9, 3.0, value=1.0), # repetition penalty
154
+ gr.Textbox(lines=1, value="\\n,</s>") # stop
155
+ ],
156
+ outputs=[gr.Textbox(lines=7, label="BLOOM OUTPUT:"), gr.Textbox(lines=7,label="BLOOMZ OUTPUT:")],
157
+
158
+ examples=examples,
159
+ cache_examples=True,
160
+ title="BLOOM vs BLOOMZ",
161
+ description='''<p>Compare outputs of the BLOOM and BLOOMZ 176 billion parameter models using the [Petals](https://petals.ml/) network. Please consider joining the Petals network to help speed up inference.</p><p>Big thanks to [RFTCapital](https://www.rftcapital.com) for providing initial compute resources.</p>'''
162
+ )
163
+
164
+ iface.launch(debug=True, share=False)