WatchOutForMike commited on
Commit
fde96e8
·
1 Parent(s): 354ca2f
Files changed (1) hide show
  1. app.py +31 -23
app.py CHANGED
@@ -2,12 +2,8 @@ import gradio as gr
2
  from PIL import Image
3
  import time
4
 
5
- # Dummy model function for demonstration purposes
6
- def model(prompt):
7
- # Simulate a model processing time
8
- time.sleep(2)
9
- # Return a placeholder image
10
- return Image.new('RGB', (512, 512), color = (73, 109, 137))
11
 
12
  # Define Gradio interface with a loading animation
13
  def model_with_loading(prompt):
@@ -15,26 +11,30 @@ def model_with_loading(prompt):
15
 
16
  # Custom CSS for D&D theme
17
  custom_css = """
 
 
18
  body {
19
- background-color: #231f20;
20
  color: #f5f5f5;
21
- font-family: 'Arial', sans-serif;
22
  }
23
 
24
  .gradio-container {
25
- background-color: #3c2a21;
26
- border-radius: 10px;
27
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
 
28
  }
29
 
30
  .gr-button {
31
  background-color: #8b4513;
32
  color: #f5f5f5;
33
  border: none;
34
- border-radius: 5px;
35
- padding: 10px 20px;
36
- font-size: 16px;
37
  cursor: pointer;
 
38
  }
39
 
40
  .gr-button:hover {
@@ -42,12 +42,14 @@ body {
42
  }
43
 
44
  .gr-textbox {
45
- background-color: #4a3728;
46
  color: #f5f5f5;
47
- border: 1px solid #8b4513;
48
- border-radius: 5px;
49
- padding: 10px;
50
- font-size: 16px;
 
 
51
  }
52
 
53
  .gr-textbox::placeholder {
@@ -55,24 +57,30 @@ body {
55
  }
56
 
57
  .gr-image {
58
- border: 2px solid #8b4513;
59
- border-radius: 10px;
 
60
  }
61
 
62
  .gr-title {
63
  color: #ffd700;
64
- font-size: 24px;
65
  font-weight: bold;
 
 
66
  }
67
 
68
  .gr-description {
69
  color: #ffd700;
70
- font-size: 18px;
 
 
71
  }
72
 
73
  .gr-link {
74
  color: #ffd700;
75
  text-decoration: underline;
 
76
  }
77
 
78
  .gr-link:hover {
 
2
  from PIL import Image
3
  import time
4
 
5
+ # Load the model from Hugging Face
6
+ model = gr.load("models/prashanth970/flux-lora-uncensored")
 
 
 
 
7
 
8
  # Define Gradio interface with a loading animation
9
  def model_with_loading(prompt):
 
11
 
12
  # Custom CSS for D&D theme
13
  custom_css = """
14
+ @import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');
15
+
16
  body {
17
+ background-color: #1a1a1a;
18
  color: #f5f5f5;
19
+ font-family: 'MedievalSharp', cursive;
20
  }
21
 
22
  .gradio-container {
23
+ background-color: #2c2c2c;
24
+ border-radius: 15px;
25
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
26
+ padding: 20px;
27
  }
28
 
29
  .gr-button {
30
  background-color: #8b4513;
31
  color: #f5f5f5;
32
  border: none;
33
+ border-radius: 8px;
34
+ padding: 12px 24px;
35
+ font-size: 18px;
36
  cursor: pointer;
37
+ transition: background-color 0.3s;
38
  }
39
 
40
  .gr-button:hover {
 
42
  }
43
 
44
  .gr-textbox {
45
+ background-color: #3c3c3c;
46
  color: #f5f5f5;
47
+ border: 2px solid #8b4513;
48
+ border-radius: 8px;
49
+ padding: 12px;
50
+ font-size: 18px;
51
+ width: 100%;
52
+ box-sizing: border-box;
53
  }
54
 
55
  .gr-textbox::placeholder {
 
57
  }
58
 
59
  .gr-image {
60
+ border: 4px solid #8b4513;
61
+ border-radius: 15px;
62
+ margin-top: 20px;
63
  }
64
 
65
  .gr-title {
66
  color: #ffd700;
67
+ font-size: 32px;
68
  font-weight: bold;
69
+ text-align: center;
70
+ margin-bottom: 20px;
71
  }
72
 
73
  .gr-description {
74
  color: #ffd700;
75
+ font-size: 20px;
76
+ text-align: center;
77
+ margin-bottom: 20px;
78
  }
79
 
80
  .gr-link {
81
  color: #ffd700;
82
  text-decoration: underline;
83
+ font-size: 18px;
84
  }
85
 
86
  .gr-link:hover {