Spaces:
Runtime error
Runtime error
Uploading FoodExtract demo app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,14 @@
|
|
| 3 |
import time
|
| 4 |
import transformers
|
| 5 |
import torch
|
| 6 |
-
import spaces
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
|
| 10 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 11 |
from transformers import pipeline
|
| 12 |
|
| 13 |
-
@spaces.GPU # Optional: run our model on the GPU
|
| 14 |
def pred_on_text(input_text):
|
| 15 |
start_time = time.time()
|
| 16 |
|
|
|
|
| 3 |
import time
|
| 4 |
import transformers
|
| 5 |
import torch
|
| 6 |
+
import spaces
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
|
| 10 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 11 |
from transformers import pipeline
|
| 12 |
|
| 13 |
+
@spaces.GPU # Optional: run our model on the GPU
|
| 14 |
def pred_on_text(input_text):
|
| 15 |
start_time = time.time()
|
| 16 |
|