jophex commited on
Commit
97dce6a
·
verified ·
1 Parent(s): 5d112ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -10
app.py CHANGED
@@ -1,21 +1,33 @@
1
- import gradio as gr
 
 
 
 
2
 
3
 
 
 
 
 
 
 
 
4
 
5
- model = gr.load("models/microsoft/Phi-3.5-mini-instruct")
6
 
7
 
8
- gradio_app = gr.Interface(
9
- fn=model,
10
- inputs="text",
11
- outputs="text",
12
- max_batch_size=50,
13
- title="Advertisment companion",
14
- )
15
 
 
 
16
 
 
 
 
17
 
18
- gradio_app.launch(share=True)
 
19
 
20
 
21
 
 
1
+ # import gradio as gr
2
+
3
+
4
+
5
+ # model = gr.load("models/microsoft/Phi-3.5-mini-instruct")
6
 
7
 
8
+ # gradio_app = gr.Interface(
9
+ # fn=model,
10
+ # inputs="text",
11
+ # outputs="text",
12
+ # max_batch_size=50,
13
+ # title="Advertisment companion",
14
+ # )
15
 
 
16
 
17
 
18
+ # gradio_app.launch(share=True)
19
+
20
+ import gradio as gr
 
 
 
 
21
 
22
+ # Load the model with gr.load()
23
+ model_interface = gr.load("models/microsoft/Phi-3.5-mini-instruct")
24
 
25
+ # Add customizations directly to the interface
26
+ model_interface.title = "Advertisement Companion"
27
+ model_interface.description = "Ask anything about advertising. Get professional advice and tips!"
28
 
29
+ # Launch the model with batch processing
30
+ model_interface.queue(concurrency_count=1, max_batch_size=50).launch(share=True)
31
 
32
 
33