Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
9 |
-
|
10 |
-
|
11 |
-
outputs="text",
|
12 |
-
max_batch_size=50,
|
13 |
-
title="Advertisment companion",
|
14 |
-
)
|
15 |
|
|
|
|
|
16 |
|
|
|
|
|
|
|
17 |
|
18 |
-
|
|
|
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 |
|