eyosi1 commited on
Commit
4da2558
·
verified ·
1 Parent(s): 7e6100e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -1,6 +1,23 @@
1
  import gradio as gr
2
  from huggingface_hub import login, logout, whoami
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  # Function to handle login
5
  def handle_login(token):
6
  try:
@@ -30,7 +47,7 @@ def restricted_functionality(prompt):
30
  return f"Model response to: {prompt}"
31
 
32
  # Gradio interface
33
- with gr.Blocks() as demo:
34
  with gr.Sidebar():
35
  gr.Markdown("# Inference Provider")
36
  gr.Markdown("This Space showcases the deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct model, served by the nebius API. Sign in with your Hugging Face account to use this API.")
 
1
  import gradio as gr
2
  from huggingface_hub import login, logout, whoami
3
 
4
+ # Custom CSS for background gradient
5
+ custom_css = """
6
+ body, .gradio-container {
7
+ background: linear-gradient(135deg, #1e3c72, #2a5298);
8
+ color: white;
9
+ }
10
+ .sidebar {
11
+ background: rgba(255, 255, 255, 0.1) !important;
12
+ border-radius: 10px;
13
+ padding: 20px;
14
+ margin: 10px;
15
+ }
16
+ .sidebar .markdown {
17
+ color: white !important;
18
+ }
19
+ """
20
+
21
  # Function to handle login
22
  def handle_login(token):
23
  try:
 
47
  return f"Model response to: {prompt}"
48
 
49
  # Gradio interface
50
+ with gr.Blocks(css=custom_css) as demo:
51
  with gr.Sidebar():
52
  gr.Markdown("# Inference Provider")
53
  gr.Markdown("This Space showcases the deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct model, served by the nebius API. Sign in with your Hugging Face account to use this API.")