Spaces:
Sleeping
Sleeping
Changed initial app
Browse files
app.py
CHANGED
|
@@ -1,10 +1,15 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|