Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
import torch
|
2 |
-
import
|
|
|
3 |
import matplotlib.pyplot as plt
|
4 |
import mplfinance as mpf
|
|
|
5 |
from PIL import Image, ImageDraw, ImageFont
|
6 |
-
import gradio as gr
|
7 |
import datetime
|
8 |
-
import logging
|
9 |
-
from transformers import AutoProcessor, AutoModelForPreTraining
|
10 |
import tempfile
|
11 |
-
import
|
12 |
|
13 |
# Configure logging
|
14 |
logging.basicConfig(filename='debug.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
15 |
|
16 |
-
# Load the
|
17 |
processor = AutoProcessor.from_pretrained("mobenta/chart_analysis")
|
18 |
model = AutoModelForPreTraining.from_pretrained("mobenta/chart_analysis")
|
19 |
|
|
|
1 |
import torch
|
2 |
+
import gradio as gr
|
3 |
+
from transformers import AutoProcessor, AutoModelForPreTraining
|
4 |
import matplotlib.pyplot as plt
|
5 |
import mplfinance as mpf
|
6 |
+
import yfinance as yf
|
7 |
from PIL import Image, ImageDraw, ImageFont
|
|
|
8 |
import datetime
|
|
|
|
|
9 |
import tempfile
|
10 |
+
import logging
|
11 |
|
12 |
# Configure logging
|
13 |
logging.basicConfig(filename='debug.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
14 |
|
15 |
+
# Load the model and processor
|
16 |
processor = AutoProcessor.from_pretrained("mobenta/chart_analysis")
|
17 |
model = AutoModelForPreTraining.from_pretrained("mobenta/chart_analysis")
|
18 |
|