Razzaqi3143 commited on
Commit
fb42cdb
·
verified ·
1 Parent(s): 9081ba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -12,7 +12,6 @@ os.environ["GROQ_API_KEY"] = os.getenv("GROQ_API_KEY") # Read from secrets, if
12
  client = Groq(api_key=os.getenv("GROQ_API_KEY"))
13
 
14
 
15
-
16
  def extract_text_from_file(file):
17
  """
18
  Extracts text from a PDF or Word document file.
@@ -96,11 +95,11 @@ def generate_questions(file, question_type, save_format):
96
  return questions_display, None
97
 
98
  # Gradio Interface
99
- file_input = gr.inputs.File(label="Upload PDF or Word Document")
100
- question_type = gr.inputs.Dropdown(["MCQ", "Fill-in-the-Blank", "Short Answer", "Concept Explanation", "Numerical"], label="Question Type")
101
- save_format = gr.inputs.Dropdown(["None", "Text File", "CSV File"], label="Save Questions As")
102
- output_text = gr.outputs.Textbox(label="Generated Questions")
103
- output_file = gr.outputs.File(label="Download File")
104
 
105
  gr.Interface(
106
  fn=generate_questions,
 
12
  client = Groq(api_key=os.getenv("GROQ_API_KEY"))
13
 
14
 
 
15
  def extract_text_from_file(file):
16
  """
17
  Extracts text from a PDF or Word document file.
 
95
  return questions_display, None
96
 
97
  # Gradio Interface
98
+ file_input = gr.File(label="Upload PDF or Word Document")
99
+ question_type = gr.Dropdown(["MCQ", "Fill-in-the-Blank", "Short Answer", "Concept Explanation", "Numerical"], label="Question Type")
100
+ save_format = gr.Dropdown(["None", "Text File", "CSV File"], label="Save Questions As")
101
+ output_text = gr.Textbox(label="Generated Questions")
102
+ output_file = gr.File(label="Download File")
103
 
104
  gr.Interface(
105
  fn=generate_questions,