Update app.py
Browse files
app.py
CHANGED
@@ -28,28 +28,28 @@ def chat_function(message, history):
|
|
28 |
# ... (Chat function remains the same) ...
|
29 |
|
30 |
# --- Gradio Interface with Background Image and Tabs ---
|
31 |
-
with gr.Blocks(css="""
|
32 |
-
body {
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
-
""", title="PLOD Filtered with Monitoring") as demo:
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
# Launch the app
|
53 |
demo.launch(share=True)
|
54 |
|
55 |
|
|
|
28 |
# ... (Chat function remains the same) ...
|
29 |
|
30 |
# --- Gradio Interface with Background Image and Tabs ---
|
31 |
+
with gr.Blocks(css="""
|
32 |
+
body {
|
33 |
+
background-image: url("stag.jpeg");
|
34 |
+
background-size: cover;
|
35 |
+
background-repeat: no-repeat;
|
36 |
+
}
|
37 |
+
""", title="PLOD Filtered with Monitoring") as demo:
|
38 |
+
with gr.Tab("Chat"):
|
39 |
+
gr.Markdown("## Chat with the Bot")
|
40 |
+
chatbot = gr.ChatInterface(fn=chat_function)
|
41 |
+
|
42 |
+
with gr.Tab("Model Properties"):
|
43 |
+
gr.Markdown("## Model Information")
|
44 |
+
gr.Textbox(label="Model Name", value=model_name, interactive=False)
|
45 |
+
gr.Textbox(label="Model Type", value=model.config.model_type, interactive=False)
|
46 |
+
gr.Number(label="Number of Parameters", value=model.num_parameters(), interactive=False)
|
47 |
+
|
48 |
+
# ... other tabs (Performance Metrics, Infrastructure, Logs) ...
|
49 |
+
|
50 |
+
# ... (rest of the code for update functions and background threads)
|
51 |
+
|
52 |
+
# Launch the app
|
53 |
demo.launch(share=True)
|
54 |
|
55 |
|