andreska commited on
Commit
028fc71
·
verified ·
1 Parent(s): ccbfab3

Changed initial app

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -1,10 +1,15 @@
1
- import gradio as gr
2
 
3
- def answer_question(project_data, question):
4
- # Process the project_data and question to generate an answer
5
- # Replace this with your actual logic
6
- answer = f"Answer to '{question}' based on '{project_data}': [Your Answer Here]"
7
- return answer
 
 
 
 
 
8
 
9
  with gr.Blocks() as demo: # Create a Blocks context
10
  project_data = gr.Textbox(label="Project Data", lines=2, value=state.context)
 
1
+ import gradio as gr
2
 
3
+ class State:
4
+ def __init__(self):
5
+ self.context = "This Adrega component is designed to answer questions provided by API"
6
+ self.question = "What does this component do?"
7
+
8
+ state = State()
9
+
10
+ def update_values(context):
11
+ state.context = context
12
+ return state.context
13
 
14
  with gr.Blocks() as demo: # Create a Blocks context
15
  project_data = gr.Textbox(label="Project Data", lines=2, value=state.context)