Interface adjustment
Browse files- __pycache__/stocks.cpython-311.pyc +0 -0
- app.py +9 -3
__pycache__/stocks.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/stocks.cpython-311.pyc and b/__pycache__/stocks.cpython-311.pyc differ
|
|
|
app.py
CHANGED
|
@@ -203,9 +203,10 @@ class GradioInterface:
|
|
| 203 |
parts = log.split(", ")
|
| 204 |
date = parts[0].strip()
|
| 205 |
details = ", ".join(parts[1:])
|
| 206 |
-
formatted_logs.append(f"-
|
| 207 |
elif "Final Portfolio Value" in log:
|
| 208 |
-
continue
|
|
|
|
| 209 |
|
| 210 |
# Adicionar seção de logs na saída
|
| 211 |
output_ops = "### Log :\n\n" + "\n".join(formatted_logs)
|
|
@@ -217,13 +218,18 @@ class GradioInterface:
|
|
| 217 |
negative_sentiment = sentiment.get('negative', 0.0)
|
| 218 |
neutral_sentiment = sentiment.get('neutral', 0.0)
|
| 219 |
positive_sentiment = sentiment.get('positive', 0.0)
|
|
|
|
| 220 |
|
| 221 |
# Gerar saída formatada em Markdown
|
| 222 |
output = f"""
|
| 223 |
## Recommendation: {result['recommendation']}
|
| 224 |
|
| 225 |
**Confidence**: {result['confidence']['total_confidence']:.2%}
|
| 226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
|
| 228 |
### Details:
|
| 229 |
|
|
|
|
| 203 |
parts = log.split(", ")
|
| 204 |
date = parts[0].strip()
|
| 205 |
details = ", ".join(parts[1:])
|
| 206 |
+
formatted_logs.append(f"- 📈 **Result** ({date}): {details}")
|
| 207 |
elif "Final Portfolio Value" in log:
|
| 208 |
+
continue
|
| 209 |
+
|
| 210 |
|
| 211 |
# Adicionar seção de logs na saída
|
| 212 |
output_ops = "### Log :\n\n" + "\n".join(formatted_logs)
|
|
|
|
| 218 |
negative_sentiment = sentiment.get('negative', 0.0)
|
| 219 |
neutral_sentiment = sentiment.get('neutral', 0.0)
|
| 220 |
positive_sentiment = sentiment.get('positive', 0.0)
|
| 221 |
+
|
| 222 |
|
| 223 |
# Gerar saída formatada em Markdown
|
| 224 |
output = f"""
|
| 225 |
## Recommendation: {result['recommendation']}
|
| 226 |
|
| 227 |
**Confidence**: {result['confidence']['total_confidence']:.2%}
|
| 228 |
+
|
| 229 |
+
## Simulation Results:
|
| 230 |
+
- **Initial Investment**: ${initial_investment:.2f}
|
| 231 |
+
- **Simulation Summary**: {(final_value/initial_investment-1)*100:.2f}%
|
| 232 |
+
- **Final Portfolio Value**: ${final_value:.2f}
|
| 233 |
|
| 234 |
### Details:
|
| 235 |
|