Anitaliu98 commited on
Commit
05d7838
·
verified ·
1 Parent(s): cab0013

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -18
app.py CHANGED
@@ -46,25 +46,17 @@ def http_bot(messages, argsbox):
46
 
47
 
48
 
49
- # with gr.Blocks() as demo:
50
- # gr.Markdown("# vLLM text completion demo\n")
51
- # inputbox = gr.Textbox(label="Input",
52
- # placeholder="Enter text and press ENTER")
53
- # argsbox = gr.Textbox(label="Args", placeholder="a dict of {api_key, base_url, model, temperature, max_tokens}")
54
- # outputbox = gr.Textbox(label="Output",
55
- # placeholder="Generated result from the model")
56
- # submit = gr.Button("Submit")
57
 
58
- # submit.click(http_bot, [inputbox, argsbox], [outputbox], api_name="submit")
59
 
60
- # demo.launch(share=True)
61
-
62
- demo = gr.Interface(
63
- fn=predict,
64
- inputs=[gr.Textbox(label="Input",placeholder="Enter text and press ENTER")\
65
- gr.Textbox(label="Args", placeholder="a dict of {api_key, base_url, model, temperature, max_tokens}")
66
- ],
67
- outputs='text',
68
- )
69
  demo.launch(share=True)
70
 
 
 
46
 
47
 
48
 
49
+ with gr.Blocks() as demo:
50
+ gr.Markdown("# vLLM text completion demo\n")
51
+ inputbox = gr.Textbox(label="Input",
52
+ placeholder="Enter text and press ENTER")
53
+ argsbox = gr.Textbox(label="Args", placeholder="a dict of {api_key, base_url, model, temperature, max_tokens}")
54
+ outputbox = gr.Textbox(label="Output",
55
+ placeholder="Generated result from the model")
56
+ submit = gr.Button("Submit")
57
 
58
+ submit.click(http_bot, [inputbox, argsbox], [outputbox], api_name="submit")
59
 
 
 
 
 
 
 
 
 
 
60
  demo.launch(share=True)
61
 
62
+