Vera-ZWY commited on
Commit
b86e68b
·
verified ·
1 Parent(s): c2f2b30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -31
app.py CHANGED
@@ -47,12 +47,16 @@ def stream_chat_with_rag(
47
 
48
  return answer
49
 
50
-
 
 
 
 
51
 
52
 
53
 
54
  # Title for the application
55
- TITLE = "<h1 style='text-align:center;'>Reddit Election Q&A agent v0.1</h1>"
56
 
57
  # Create the Gradio Blocks interface
58
  with gr.Blocks(css=CSS) as demo:
@@ -69,35 +73,6 @@ with gr.Blocks(css=CSS) as demo:
69
  )
70
 
71
 
72
- # with gr.Tab("Process PDF"):
73
- # pdf_input = gr.File(label="Upload PDF File")
74
- # #select_client_dropdown = gr.Dropdown(client_name, value="rosariarossi", label="Select or Type Client", allow_custom_value=True)
75
- # pdf_output = gr.Textbox(label="PDF Result", interactive=False)
76
-
77
- # pdf_button = gr.Button("Process PDF")
78
- # pdf_button.click(
79
- # process_pdf,
80
- # inputs=[pdf_input], # Pass both PDF and client name is not required
81
- # outputs=pdf_output
82
- # )
83
-
84
- # with gr.Tab("Answer with RAG"):
85
- # question_input = gr.Textbox(label="Enter Question for RAG")
86
- # answer_with_rag_select_client_dropdown = gr.Dropdown(client_name, value="primo", label="Select or Type Client", allow_custom_value=True)
87
- # rag_output = gr.Textbox(label="RAG Answer Result", interactive=False)
88
-
89
- # rag_button = gr.Button("Get Answer")
90
- # rag_button.click(
91
- # rag_api,
92
- # inputs=[question_input,answer_with_rag_select_client_dropdown ],
93
- # outputs=rag_output
94
- # )
95
- # with gr.Tab(label="Manage Files"):
96
- # with gr.Column():
97
- # delete_index_button = gr.Button("Delete All Files")
98
- # delete_index_textout = gr.Textbox(label="Deleted Files and Refresh Result")
99
- # delete_index_button.click(fn=delete_index, inputs=[],outputs=[delete_index_textout])
100
-
101
  # Launch the app
102
  if __name__ == "__main__":
103
  demo.launch()
 
47
 
48
  return answer
49
 
50
+ CSS = """
51
+ # chat-container {
52
+ height: 100vh;
53
+ }
54
+ """
55
 
56
 
57
 
58
  # Title for the application
59
+ TITLE = "<h1 style='text-align:center;'>Reddit Election Q&A agent v0.2</h1>"
60
 
61
  # Create the Gradio Blocks interface
62
  with gr.Blocks(css=CSS) as demo:
 
73
  )
74
 
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  # Launch the app
77
  if __name__ == "__main__":
78
  demo.launch()