tseronni commited on
Commit
57ee70c
·
1 Parent(s): a77b00b

first commit

Browse files
Files changed (2) hide show
  1. app.py +38 -4
  2. requirements.txt +2 -1
app.py CHANGED
@@ -1,7 +1,41 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import pandas as pd
3
 
4
+ # theme = gr.themes.Monochrome(spacing_size=gr.themes.sizes.spacing_md,
5
+ # radius_size=gr.themes.sizes.radius_sm,
6
+ # text_size=gr.themes.sizes.text_lg).set(
7
+ # loader_color="#FF0000",
8
+ # slider_color="#FF0000"
9
+ # )
10
 
11
+
12
+ def click_button(model, abstract):
13
+ labels = {"Classificação 1": 0.75, "Classificação 2": 0.8, "Classificação 3": 0.2}
14
+ return labels
15
+
16
+
17
+ # with gr.Blocks(theme=theme) as startup_genome_demo:
18
+ with gr.Blocks() as startup_genome_demo:
19
+ state_lotto = gr.State()
20
+ selected_x_labels = gr.State()
21
+
22
+ with gr.Tab("Patent Discovery"):
23
+ with gr.Row():
24
+ dropdown_model = gr.Dropdown(label="Model", choices=['model_1', 'model_2', 'model_3'], interactive=True)
25
+ with gr.Row(equal_height=True):
26
+ abstract_description = gr.Textbox(label="Abstract description", lines=10, max_lines=10000, interactive=True, value="A holographic optical accessing system includes a light source for emitting a light beam; an optical assembly module for receiving the light beam and generating a signal beam and a reference beam that are parallel to each other rather than overlap with each other, and have the same first polarization state; a lens module for focusing the signal beam and the reference beam on a focal point at the same time; and a storage medium for recording the focal point. The optical assembly module includes at least a data plane for displaying image information so that the signal beam contains the image information.")
27
+ with gr.Row():
28
+ btn_get_result = gr.Button("Show classification")
29
+ with gr.Row():
30
+ label_result = gr.Label(num_top_classes=None)
31
+ with gr.Row():
32
+ reasoning = gr.Textbox(label="Reasoning", lines=5)
33
+ with gr.Tab("Classification data"):
34
+ pass
35
+
36
+ btn_get_result.click(fn=click_button, inputs=[dropdown_model, abstract_description], outputs=[label_result])
37
+
38
+
39
+ if __name__ == "__main__":
40
+ startup_genome_demo.queue()
41
+ startup_genome_demo.launch()
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- gradio
 
 
1
+ gradio
2
+ plotly