afrizalha commited on
Commit
e85679c
1 Parent(s): aff4485

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -36,12 +36,15 @@ def generate(starting_text, choice, temp, top_p):
36
  with gr.Blocks(theme=gr.themes.Soft()) as app:
37
  starting_text = gr.Textbox(label="Starting text", value="cinta adalah")
38
  choice = gr.Radio(["7M", "25M", "Info"], label="Select model", info="Built with the Phi-3 architecture", value='Info')
39
- # num_runs = gr.Slider(label="Number of examples", minimum=1, maximum=10, step=1, value=5)
40
  temp = gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=0.7)
41
  top_p = gr.Slider(label="Top P", minimum=0.1, maximum=1.0, step=0.1, value=0.5)
42
- title="Sasando-1",
43
- )
44
- examples=gr.Examples([["gue"], ["presiden"], ["cinta adalah"], ["allah, aku"], ["dia marah karena"],
45
- ["inflasi"], ["kolam renang"], ["messi"], ["jalan-jalan"], ["komputer itu"]], [starting_text])
46
-
47
- app.launch()
 
 
 
 
 
36
  with gr.Blocks(theme=gr.themes.Soft()) as app:
37
  starting_text = gr.Textbox(label="Starting text", value="cinta adalah")
38
  choice = gr.Radio(["7M", "25M", "Info"], label="Select model", info="Built with the Phi-3 architecture", value='Info')
 
39
  temp = gr.Slider(label="Temperature", minimum=0.1, maximum=1.0, step=0.1, value=0.7)
40
  top_p = gr.Slider(label="Top P", minimum=0.1, maximum=1.0, step=0.1, value=0.5)
41
+ gr.Interface(
42
+ fn=generate,
43
+ inputs=[starting_text,choice,temp,top_p],
44
+ outputs=[res],
45
+ allow_flagging="never",
46
+ title="Sasando-1",
47
+ )
48
+ examples=gr.Examples([["gue"], ["presiden"], ["cinta adalah"], ["allah, aku"], ["dia marah karena"],
49
+ ["inflasi"], ["kolam renang"], ["messi"], ["jalan-jalan"], ["komputer itu"]], [starting_text])
50
+ app.launch()