Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,25 @@ def generate_plant_info(plant_name, language):
|
|
50 |
return output[0]["generated_text"]
|
51 |
|
52 |
# Create Gradio interface with enhancements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
demo = gr.Interface(
|
54 |
fn=generate_plant_info,
|
55 |
inputs=[
|
@@ -70,28 +89,8 @@ demo = gr.Interface(
|
|
70 |
["الصبار", "Arabic"]
|
71 |
],
|
72 |
theme="default",
|
|
|
73 |
)
|
74 |
|
75 |
-
#
|
76 |
-
custom_css = """
|
77 |
-
<style>
|
78 |
-
body {
|
79 |
-
font-family: Arial, sans-serif;
|
80 |
-
background-color: #f9f9f9;
|
81 |
-
}
|
82 |
-
.gri-container {
|
83 |
-
border-radius: 10px;
|
84 |
-
background-color: #fff;
|
85 |
-
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
86 |
-
}
|
87 |
-
.gri-button {
|
88 |
-
background-color: #4CAF50;
|
89 |
-
color: white;
|
90 |
-
}
|
91 |
-
.gri-button:hover {
|
92 |
-
background-color: #45a049;
|
93 |
-
}
|
94 |
-
</style>
|
95 |
-
"""
|
96 |
|
97 |
-
demo.launch(share=True, css=custom_css) # Launch the interface with custom CSS
|
|
|
50 |
return output[0]["generated_text"]
|
51 |
|
52 |
# Create Gradio interface with enhancements
|
53 |
+
custom_css = """
|
54 |
+
body {
|
55 |
+
font-family: Arial, sans-serif;
|
56 |
+
background-color: #f9f9f9;
|
57 |
+
}
|
58 |
+
.gri-container {
|
59 |
+
border-radius: 10px;
|
60 |
+
background-color: #fff;
|
61 |
+
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
62 |
+
}
|
63 |
+
.gri-button {
|
64 |
+
background-color: #4CAF50;
|
65 |
+
color: white;
|
66 |
+
}
|
67 |
+
.gri-button:hover {
|
68 |
+
background-color: #45a049;
|
69 |
+
}
|
70 |
+
"""
|
71 |
+
|
72 |
demo = gr.Interface(
|
73 |
fn=generate_plant_info,
|
74 |
inputs=[
|
|
|
89 |
["الصبار", "Arabic"]
|
90 |
],
|
91 |
theme="default",
|
92 |
+
css=custom_css, # Add custom CSS here
|
93 |
)
|
94 |
|
95 |
+
demo.launch(share=True) # Launch the interface without css parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
|