khoatran94 commited on
Commit
48826bd
·
1 Parent(s): f3423fc
Files changed (1) hide show
  1. app.py +3 -3
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="Lê Duẩn là ai?")
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
- #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
  )
 
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
  )