Upload 3 files
Browse files- README.md +1 -0
- app.py +2 -0
- requirements.txt +1 -0
README.md
CHANGED
|
@@ -8,6 +8,7 @@ sdk_version: "6.26.0"
|
|
| 8 |
python_version: "3.12"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# GLS Lead Bot
|
|
|
|
| 8 |
python_version: "3.12"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
+
suggested_hardware: zero-a10g
|
| 12 |
---
|
| 13 |
|
| 14 |
# GLS Lead Bot
|
app.py
CHANGED
|
@@ -33,6 +33,7 @@ from urllib.parse import urljoin
|
|
| 33 |
import gradio as gr
|
| 34 |
import pandas as pd
|
| 35 |
import requests
|
|
|
|
| 36 |
from openai import OpenAI
|
| 37 |
|
| 38 |
try:
|
|
@@ -365,6 +366,7 @@ def dataframe_from_rows(rows: list[dict[str, Any]]) -> pd.DataFrame:
|
|
| 365 |
return df[DISPLAY_COLUMNS]
|
| 366 |
|
| 367 |
|
|
|
|
| 368 |
def on_run(files, *credential_args):
|
| 369 |
terminal: list[str] = []
|
| 370 |
if not files:
|
|
|
|
| 33 |
import gradio as gr
|
| 34 |
import pandas as pd
|
| 35 |
import requests
|
| 36 |
+
import spaces
|
| 37 |
from openai import OpenAI
|
| 38 |
|
| 39 |
try:
|
|
|
|
| 366 |
return df[DISPLAY_COLUMNS]
|
| 367 |
|
| 368 |
|
| 369 |
+
@spaces.GPU(duration=60)
|
| 370 |
def on_run(files, *credential_args):
|
| 371 |
terminal: list[str] = []
|
| 372 |
if not files:
|
requirements.txt
CHANGED
|
@@ -2,3 +2,4 @@ gradio
|
|
| 2 |
openai>=1.42,<2
|
| 3 |
pandas
|
| 4 |
requests
|
|
|
|
|
|
| 2 |
openai>=1.42,<2
|
| 3 |
pandas
|
| 4 |
requests
|
| 5 |
+
spaces
|