Spaces:
Runtime error
Runtime error
VINAYAK MODI
commited on
Commit
•
570735e
1
Parent(s):
f3b4c85
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# import gradio as gr
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
|
6 |
import gradio as gr
|
7 |
|
8 |
-
# Load your model (
|
9 |
demo = gr.load("models/vm24bho/net_dfm_myimg")
|
10 |
|
11 |
-
#
|
12 |
css = """
|
13 |
body {
|
14 |
background-color: #f5f5f5;
|
@@ -51,10 +121,10 @@ css = """
|
|
51 |
}
|
52 |
"""
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
<div class="container">
|
59 |
<div class="header">
|
60 |
<h1>Welcome to the VM24BHO Model Interface</h1>
|
@@ -64,6 +134,13 @@ demo.launch(
|
|
64 |
<!-- Gradio interface elements will be inserted here -->
|
65 |
</div>
|
66 |
</div>
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# # import gradio as gr
|
2 |
+
|
3 |
+
# # gr.load("models/vm24bho/net_dfm_myimg").launch()
|
4 |
+
|
5 |
+
|
6 |
# import gradio as gr
|
7 |
|
8 |
+
# # Load your model (this is a placeholder; replace with your actual model loading code)
|
9 |
+
# demo = gr.load("models/vm24bho/net_dfm_myimg")
|
10 |
+
|
11 |
+
# # Customize the interface
|
12 |
+
# css = """
|
13 |
+
# body {
|
14 |
+
# background-color: #f5f5f5;
|
15 |
+
# font-family: 'Arial', sans-serif;
|
16 |
+
# }
|
17 |
+
# .container {
|
18 |
+
# max-width: 800px;
|
19 |
+
# margin: 0 auto;
|
20 |
+
# padding: 20px;
|
21 |
+
# background-color: #ffffff;
|
22 |
+
# border-radius: 10px;
|
23 |
+
# box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
24 |
+
# }
|
25 |
+
# .header {
|
26 |
+
# text-align: center;
|
27 |
+
# padding-bottom: 20px;
|
28 |
+
# }
|
29 |
+
# h1 {
|
30 |
+
# color: #333333;
|
31 |
+
# }
|
32 |
+
# p {
|
33 |
+
# color: #666666;
|
34 |
+
# }
|
35 |
+
# .gradio-container {
|
36 |
+
# display: flex;
|
37 |
+
# flex-direction: column;
|
38 |
+
# gap: 20px;
|
39 |
+
# }
|
40 |
+
# button {
|
41 |
+
# background-color: #007bff;
|
42 |
+
# color: white;
|
43 |
+
# border: none;
|
44 |
+
# padding: 10px 20px;
|
45 |
+
# border-radius: 5px;
|
46 |
+
# cursor: pointer;
|
47 |
+
# font-size: 16px;
|
48 |
+
# }
|
49 |
+
# button:hover {
|
50 |
+
# background-color: #0056b3;
|
51 |
+
# }
|
52 |
+
# """
|
53 |
+
|
54 |
+
# demo.launch(
|
55 |
+
# title="Deepfake Detection",
|
56 |
+
# description="A interface for interacting with the VM24BHO model.",
|
57 |
+
# article="""
|
58 |
+
# <div class="container">
|
59 |
+
# <div class="header">
|
60 |
+
# <h1>Welcome to the VM24BHO Model Interface</h1>
|
61 |
+
# <p>Use this interface to interact with the deep learning model.</p>
|
62 |
+
# </div>
|
63 |
+
# <div class="gradio-container">
|
64 |
+
# <!-- Gradio interface elements will be inserted here -->
|
65 |
+
# </div>
|
66 |
+
# </div>
|
67 |
+
# """,
|
68 |
+
# css=css
|
69 |
+
# )
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
|
74 |
|
75 |
|
76 |
import gradio as gr
|
77 |
|
78 |
+
# Load your model (assuming the path is correct)
|
79 |
demo = gr.load("models/vm24bho/net_dfm_myimg")
|
80 |
|
81 |
+
# Custom CSS styling
|
82 |
css = """
|
83 |
body {
|
84 |
background-color: #f5f5f5;
|
|
|
121 |
}
|
122 |
"""
|
123 |
|
124 |
+
# Creating the Gradio interface
|
125 |
+
with gr.Blocks(css=css) as demo:
|
126 |
+
gr.Markdown(
|
127 |
+
"""
|
128 |
<div class="container">
|
129 |
<div class="header">
|
130 |
<h1>Welcome to the VM24BHO Model Interface</h1>
|
|
|
134 |
<!-- Gradio interface elements will be inserted here -->
|
135 |
</div>
|
136 |
</div>
|
137 |
+
"""
|
138 |
+
)
|
139 |
+
|
140 |
+
# Assuming your model has a specific input/output interface
|
141 |
+
# Adjust this part according to your actual model's input/output
|
142 |
+
gr.Interface.load("models/vm24bho/net_dfm_myimg")
|
143 |
+
|
144 |
+
# Launch the Gradio interface
|
145 |
+
demo.launch()
|
146 |
+
|