Spaces:
Runtime error
Runtime error
desarrolloasesoreslocales
commited on
Commit
•
b87d47f
1
Parent(s):
1b0465c
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ from pdf2image import convert_from_path
|
|
15 |
from PIL import Image
|
16 |
from gradio_client import Client
|
17 |
|
18 |
-
client = Client("https://
|
19 |
|
20 |
def ocrtotext(filename):
|
21 |
# Almacena todas las páginas del PDF en una variable
|
@@ -124,7 +124,12 @@ def predict(file):
|
|
124 |
|
125 |
result = client.predict(
|
126 |
recorte_final, # str in 'text' Textbox component
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
128 |
)
|
129 |
return result
|
130 |
|
|
|
15 |
from PIL import Image
|
16 |
from gradio_client import Client
|
17 |
|
18 |
+
client = Client("https://hysts-mistral-7b.hf.space/--replicas/z592x/")
|
19 |
|
20 |
def ocrtotext(filename):
|
21 |
# Almacena todas las páginas del PDF en una variable
|
|
|
124 |
|
125 |
result = client.predict(
|
126 |
recorte_final, # str in 'text' Textbox component
|
127 |
+
1, # float (numeric value between 1 and 2048) in 'Max new tokens' Slider component
|
128 |
+
0.1, # float (numeric value between 0.1 and 4.0) in 'Temperature' Slider component
|
129 |
+
0.05, # float (numeric value between 0.05 and 1.0) in 'Top-p (nucleus sampling)' Slider component
|
130 |
+
1, # float (numeric value between 1 and 1000) in 'Top-k' Slider component
|
131 |
+
1, # float (numeric value between 1.0 and 2.0) in 'Repetition penalty' Slider component
|
132 |
+
api_name="/chat"
|
133 |
)
|
134 |
return result
|
135 |
|