Spaces:
Running
on
Zero
Running
on
Zero
Update app.py (#4)
Browse files- Update app.py (6cb021110d347c75aa17f742a81aa48c65a16578)
Co-authored-by: Yanis Adel <[email protected]>
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
# --- Imports ---
|
|
|
2 |
import gradio as gr
|
3 |
from transformers import pipeline
|
4 |
import pandas as pd
|
@@ -21,6 +22,7 @@ class Log:
|
|
21 |
return f.read()
|
22 |
|
23 |
# --- Main Function ---
|
|
|
24 |
def run_chatnt(input_file, custom_question):
|
25 |
with open(log_file, "a") as log:
|
26 |
log.write("Request started\n")
|
|
|
1 |
# --- Imports ---
|
2 |
+
import spaces
|
3 |
import gradio as gr
|
4 |
from transformers import pipeline
|
5 |
import pandas as pd
|
|
|
22 |
return f.read()
|
23 |
|
24 |
# --- Main Function ---
|
25 |
+
@spaces.GPU
|
26 |
def run_chatnt(input_file, custom_question):
|
27 |
with open(log_file, "a") as log:
|
28 |
log.write("Request started\n")
|