Spaces:
Running
on
Zero
Running
on
Zero
srijaydeshpande
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -115,10 +115,10 @@ def deidentify_doc(pdftext, maxtokens, temperature, top_probability):
|
|
115 |
settings.repeat_penalty = 1.1
|
116 |
settings.stream = True
|
117 |
|
|
|
118 |
stream = agent.get_chat_response(
|
119 |
-
|
120 |
llm_sampling_settings=settings,
|
121 |
-
chat_history=messages,
|
122 |
returns_streaming_generator=True,
|
123 |
print_output=False
|
124 |
)
|
@@ -159,7 +159,7 @@ def deidentify_doc(pdftext, maxtokens, temperature, top_probability):
|
|
159 |
# print(output)
|
160 |
# print('-------------------------------------------------------')
|
161 |
|
162 |
-
return
|
163 |
|
164 |
@spaces.GPU(duration=120)
|
165 |
def pdf_to_text(files, maxtokens=2048, temperature=0, top_probability=0.95):
|
|
|
115 |
settings.repeat_penalty = 1.1
|
116 |
settings.stream = True
|
117 |
|
118 |
+
|
119 |
stream = agent.get_chat_response(
|
120 |
+
prompt + ' : ' + pdftext,
|
121 |
llm_sampling_settings=settings,
|
|
|
122 |
returns_streaming_generator=True,
|
123 |
print_output=False
|
124 |
)
|
|
|
159 |
# print(output)
|
160 |
# print('-------------------------------------------------------')
|
161 |
|
162 |
+
# return outputs
|
163 |
|
164 |
@spaces.GPU(duration=120)
|
165 |
def pdf_to_text(files, maxtokens=2048, temperature=0, top_probability=0.95):
|