Arivara commited on
Commit
f4f765a
Β·
verified Β·
1 Parent(s): 59e73bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -35
app.py CHANGED
@@ -2,11 +2,10 @@ import gradio as gr
2
  from RAG_AGENT import gemini_explain_file, extract_clean_pdf_text
3
  import os
4
 
5
- # Fixed minimalist dark CSS
6
  css = """
7
  .gradio-container {
8
  font-family: 'Inter', sans-serif;
9
- max-width: 800px !important;
10
  margin: auto;
11
  padding: 2rem;
12
  background-color: #121212;
@@ -56,10 +55,11 @@ css = """
56
  border-radius: 10px;
57
  padding: 1.5rem;
58
  border: 1px solid #333;
59
- min-height: 200px;
60
  font-size: 1rem;
61
  line-height: 1.6;
62
  color: #e0e0e0;
 
63
  }
64
 
65
  .footer {
@@ -99,38 +99,39 @@ with gr.Blocks(css=css, title="Science Analyzer - Dark UI") as demo:
99
  </div>
100
  """)
101
 
102
- with gr.Row(equal_height=True):
103
- with gr.Column():
104
- file_input = gr.File(
105
- label="πŸ“ Upload File",
106
- file_types=[".pdf", ".png", ".jpg", ".jpeg"],
107
- file_count="single",
108
- elem_classes=["upload-area"]
109
- )
110
-
111
- analysis_type = gr.Radio(
112
- choices=["AI Analysis", "Extract PDF Text"],
113
- value="AI Analysis",
114
- label="πŸ” Analysis Type"
115
- )
116
-
117
- question_input = gr.Textbox(
118
- label="Ask a Question (Optional)",
119
- placeholder="Type your question here...",
120
- lines=2
121
- )
122
-
123
- analyze_btn = gr.Button(
124
- "πŸš€ Analyze",
125
- variant="primary",
126
- elem_classes=["btn-primary"]
127
- )
128
-
129
- with gr.Column():
130
- output_box = gr.Markdown(
131
- value="πŸ“„ Upload a file and click Analyze.",
132
- elem_id="custom-output"
133
- )
 
134
 
135
  gr.HTML("""
136
  <div class="footer">
 
2
  from RAG_AGENT import gemini_explain_file, extract_clean_pdf_text
3
  import os
4
 
 
5
  css = """
6
  .gradio-container {
7
  font-family: 'Inter', sans-serif;
8
+ max-width: 850px !important;
9
  margin: auto;
10
  padding: 2rem;
11
  background-color: #121212;
 
55
  border-radius: 10px;
56
  padding: 1.5rem;
57
  border: 1px solid #333;
58
+ min-height: 250px;
59
  font-size: 1rem;
60
  line-height: 1.6;
61
  color: #e0e0e0;
62
+ margin-top: 2rem;
63
  }
64
 
65
  .footer {
 
99
  </div>
100
  """)
101
 
102
+ with gr.Column():
103
+ with gr.Row():
104
+ with gr.Column():
105
+ file_input = gr.File(
106
+ label="πŸ“ Upload File",
107
+ file_types=[".pdf", ".png", ".jpg", ".jpeg"],
108
+ file_count="single",
109
+ elem_classes=["upload-area"]
110
+ )
111
+
112
+ analysis_type = gr.Radio(
113
+ choices=["AI Analysis", "Extract PDF Text"],
114
+ value="AI Analysis",
115
+ label="πŸ” Analysis Type"
116
+ )
117
+
118
+ question_input = gr.Textbox(
119
+ label="Ask a Question (Optional)",
120
+ placeholder="Type your question here...",
121
+ lines=2
122
+ )
123
+
124
+ analyze_btn = gr.Button(
125
+ "πŸš€ Analyze",
126
+ variant="primary",
127
+ elem_classes=["btn-primary"]
128
+ )
129
+
130
+ output_box = gr.Markdown(
131
+ value="πŸ“„ Upload a file and click Analyze.",
132
+ elem_id="custom-output",
133
+ show_label=False
134
+ )
135
 
136
  gr.HTML("""
137
  <div class="footer">