Spaces:
Sleeping
Sleeping
Commit ·
4f91aef
1
Parent(s): 2d0acf6
DEBUG
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from src.pipelines.completePipeline import Pipeline
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
import os
|
| 4 |
|
| 5 |
# os.system("apt-get update -y")
|
|
@@ -9,7 +10,7 @@ import os
|
|
| 9 |
chain = None
|
| 10 |
pipeline = Pipeline()
|
| 11 |
|
| 12 |
-
|
| 13 |
def getTextResponse(text: str, inputQuery: str):
|
| 14 |
global chain
|
| 15 |
if chain is None:
|
|
@@ -24,6 +25,7 @@ def getTextResponse(text: str, inputQuery: str):
|
|
| 24 |
return response
|
| 25 |
|
| 26 |
|
|
|
|
| 27 |
def getSearchablePdfResponse(path: str, inputQuery: str):
|
| 28 |
global chain
|
| 29 |
if chain is None:
|
|
@@ -37,6 +39,7 @@ def getSearchablePdfResponse(path: str, inputQuery: str):
|
|
| 37 |
)
|
| 38 |
return response
|
| 39 |
|
|
|
|
| 40 |
def getScannablePdfResponse(path: str, inputQuery: str):
|
| 41 |
global chain
|
| 42 |
if chain is None:
|
|
|
|
| 1 |
from src.pipelines.completePipeline import Pipeline
|
| 2 |
import gradio as gr
|
| 3 |
+
import spaces
|
| 4 |
import os
|
| 5 |
|
| 6 |
# os.system("apt-get update -y")
|
|
|
|
| 10 |
chain = None
|
| 11 |
pipeline = Pipeline()
|
| 12 |
|
| 13 |
+
@spaces.GPU
|
| 14 |
def getTextResponse(text: str, inputQuery: str):
|
| 15 |
global chain
|
| 16 |
if chain is None:
|
|
|
|
| 25 |
return response
|
| 26 |
|
| 27 |
|
| 28 |
+
@spaces.GPU
|
| 29 |
def getSearchablePdfResponse(path: str, inputQuery: str):
|
| 30 |
global chain
|
| 31 |
if chain is None:
|
|
|
|
| 39 |
)
|
| 40 |
return response
|
| 41 |
|
| 42 |
+
@spaces.GPU
|
| 43 |
def getScannablePdfResponse(path: str, inputQuery: str):
|
| 44 |
global chain
|
| 45 |
if chain is None:
|