Mohamed-Maher commited on
Commit
72f94cf
1 Parent(s): b7ad4c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -67,13 +67,18 @@ class HadithChatApp:
67
  def greet(self, question):
68
  answer = self.generate_answer(question)
69
  return answer
70
-
71
  if __name__ == "__main__":
 
72
  hadith_chat_app = HadithChatApp()
 
 
73
  iface = gr.Interface(
74
  fn=hadith_chat_app.greet,
75
  inputs="text",
76
  outputs="text",
77
  title="Hadith QA App"
78
- )
79
- iface.launch(inline=False)
 
 
 
67
  def greet(self, question):
68
  answer = self.generate_answer(question)
69
  return answer
70
+
71
  if __name__ == "__main__":
72
+ # Initialize the app
73
  hadith_chat_app = HadithChatApp()
74
+
75
+ # Set up the Gradio interface
76
  iface = gr.Interface(
77
  fn=hadith_chat_app.greet,
78
  inputs="text",
79
  outputs="text",
80
  title="Hadith QA App"
81
+ )
82
+
83
+ # Launch the Gradio interface
84
+ iface.launch()