aidevhund commited on
Commit
e34124c
·
verified ·
1 Parent(s): 0c14c75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -27
app.py CHANGED
@@ -77,18 +77,15 @@ custom_css = """
77
  --text-color: #1e293b;
78
  --border-color: #e2e8f0;
79
  }
80
-
81
  body {
82
  background-color: var(--background-color);
83
  color: var(--text-color);
84
  }
85
-
86
  .container {
87
  max-width: 1200px;
88
  margin: 0 auto;
89
  padding: 20px;
90
  }
91
-
92
  .analysis-box {
93
  background-color: white;
94
  border-radius: 12px;
@@ -99,7 +96,6 @@ body {
99
  overflow-y: auto;
100
  width: 100%;
101
  }
102
-
103
  .upload-box {
104
  background-color: white;
105
  border-radius: 12px;
@@ -108,7 +104,6 @@ body {
108
  border: 1px solid var(--border-color);
109
  width: 100%;
110
  }
111
-
112
  .primary-button {
113
  background-color: var(--primary-color) !important;
114
  color: white !important;
@@ -117,36 +112,30 @@ body {
117
  font-weight: 500 !important;
118
  width: 100%;
119
  }
120
-
121
  .primary-button:hover {
122
  background-color: var(--secondary-color) !important;
123
  }
124
-
125
  .markdown-container {
126
  max-width: 100%;
127
  margin: 0 auto;
128
  padding: 0 15px;
129
  word-wrap: break-word;
130
  }
131
-
132
  .loading-text {
133
  color: var(--primary-color);
134
  font-size: 1.2rem;
135
  text-align: center;
136
  margin-top: 2rem;
137
  }
138
-
139
  .row {
140
  display: flex;
141
  flex-wrap: wrap;
142
  gap: 20px;
143
  }
144
-
145
  .column {
146
  flex: 1;
147
  min-width: 300px;
148
  }
149
-
150
  @media (max-width: 768px) {
151
  .row {
152
  flex-direction: column;
@@ -167,7 +156,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
167
  gr.Markdown("""
168
  <div style="text-align: center; margin-bottom: 32px;">
169
  <h1 style="color: var(--primary-color); font-size: 2.5rem; margin-bottom: 16px;">
170
- 🚀 CryptoVision Pro
171
  </h1>
172
  <p style="color: var(--text-color); font-size: 1.1rem;">
173
  Advanced AI-powered cryptocurrency technical analysis
@@ -200,25 +189,13 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
200
  analysis_output = gr.Markdown(
201
  label="",
202
  elem_classes=["markdown-container"],
203
- value="<div class='loading-text'>Report is generating...</div>"
204
- )
205
- # Loading message when analysis starts
206
- loading_message = gr.Markdown(
207
- label="",
208
- elem_classes=["loading-text"],
209
- value="<div class='loading-text'>Processing the chart, please wait...</div>",
210
- visible=False
211
  )
212
 
213
  # Event Handling
214
- def start_analysis(chart_input):
215
- loading_message.update(visible=True) # Show loading message
216
- result = analyzer.analyze_chart(chart_input)
217
- loading_message.update(visible=False) # Hide loading message
218
- return result
219
-
220
  analyze_btn.click(
221
- fn=start_analysis,
222
  inputs=chart_input,
223
  outputs=analysis_output,
224
  api_name="analyze"
 
77
  --text-color: #1e293b;
78
  --border-color: #e2e8f0;
79
  }
 
80
  body {
81
  background-color: var(--background-color);
82
  color: var(--text-color);
83
  }
 
84
  .container {
85
  max-width: 1200px;
86
  margin: 0 auto;
87
  padding: 20px;
88
  }
 
89
  .analysis-box {
90
  background-color: white;
91
  border-radius: 12px;
 
96
  overflow-y: auto;
97
  width: 100%;
98
  }
 
99
  .upload-box {
100
  background-color: white;
101
  border-radius: 12px;
 
104
  border: 1px solid var(--border-color);
105
  width: 100%;
106
  }
 
107
  .primary-button {
108
  background-color: var(--primary-color) !important;
109
  color: white !important;
 
112
  font-weight: 500 !important;
113
  width: 100%;
114
  }
 
115
  .primary-button:hover {
116
  background-color: var(--secondary-color) !important;
117
  }
 
118
  .markdown-container {
119
  max-width: 100%;
120
  margin: 0 auto;
121
  padding: 0 15px;
122
  word-wrap: break-word;
123
  }
 
124
  .loading-text {
125
  color: var(--primary-color);
126
  font-size: 1.2rem;
127
  text-align: center;
128
  margin-top: 2rem;
129
  }
 
130
  .row {
131
  display: flex;
132
  flex-wrap: wrap;
133
  gap: 20px;
134
  }
 
135
  .column {
136
  flex: 1;
137
  min-width: 300px;
138
  }
 
139
  @media (max-width: 768px) {
140
  .row {
141
  flex-direction: column;
 
156
  gr.Markdown("""
157
  <div style="text-align: center; margin-bottom: 32px;">
158
  <h1 style="color: var(--primary-color); font-size: 2.5rem; margin-bottom: 16px;">
159
+ 🚀 HundAI Trade Agent
160
  </h1>
161
  <p style="color: var(--text-color); font-size: 1.1rem;">
162
  Advanced AI-powered cryptocurrency technical analysis
 
189
  analysis_output = gr.Markdown(
190
  label="",
191
  elem_classes=["markdown-container"],
192
+ height=300,
193
+ value="<div class='loading-text'>Report will be ready...</div>"
 
 
 
 
 
 
194
  )
195
 
196
  # Event Handling
 
 
 
 
 
 
197
  analyze_btn.click(
198
+ fn=analyzer.analyze_chart,
199
  inputs=chart_input,
200
  outputs=analysis_output,
201
  api_name="analyze"