Spaces:
Sleeping
Sleeping
Commit
·
48826bd
1
Parent(s):
f3423fc
test
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def read_pdf(file_path):
|
|
52 |
#@spaces.GPU
|
53 |
def query_huggingface(text):
|
54 |
api = InferenceApi(repo_id="google/gemma-2-9b-it", token="your_token_here")
|
55 |
-
response = api(inputs=
|
56 |
return response
|
57 |
|
58 |
# Gradio Interface for PDF Processing
|
@@ -66,11 +66,11 @@ interface = gr.Interface(
|
|
66 |
fn=process_file,
|
67 |
inputs=[
|
68 |
gr.File(label="Upload a PDF file"),
|
69 |
-
|
70 |
],
|
71 |
outputs=[
|
72 |
gr.Textbox(label="PDF Content"),
|
73 |
-
|
74 |
],
|
75 |
title="PDF Processor with Hugging Face Query"
|
76 |
)
|
|
|
52 |
#@spaces.GPU
|
53 |
def query_huggingface(text):
|
54 |
api = InferenceApi(repo_id="google/gemma-2-9b-it", token="your_token_here")
|
55 |
+
response = api(inputs=text)
|
56 |
return response
|
57 |
|
58 |
# Gradio Interface for PDF Processing
|
|
|
66 |
fn=process_file,
|
67 |
inputs=[
|
68 |
gr.File(label="Upload a PDF file"),
|
69 |
+
gr.Textbox(label="Enter your query for Hugging Face"),
|
70 |
],
|
71 |
outputs=[
|
72 |
gr.Textbox(label="PDF Content"),
|
73 |
+
gr.Textbox(label="Hugging Face Output"),
|
74 |
],
|
75 |
title="PDF Processor with Hugging Face Query"
|
76 |
)
|