jennzhuge commited on
Commit
2c039db
·
1 Parent(s): 964fd26
Files changed (1) hide show
  1. app.py +16 -12
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import json
2
  import pandas as pd
3
  import gradio as gr
4
- from transformers import PreTrainedTokenizerFast, BertForMaskedLM
5
  from datasets import load_dataset
6
  import infer
7
 
@@ -68,13 +68,15 @@ with gr.Blocks() as demo:
68
  gr.Markdown("Enter a DNA sequence and the coordinates at which its sample was taken to get a genus prediction. Click 'I'm feeling lucky' to see a prediction for a random sequence.")
69
 
70
  # Collect inputs for app (DNA and location)
71
- with gr.Column():
72
- inp_dna = gr.Textbox(label="DNA", placeholder="e.g. AACAATGTA... (min 200 and max 660 characters)")
73
- with gr.Column():
74
- with gr.Row():
75
- inp_lat = gr.Textbox(label="Latitude", placeholder="e.g. -3.009083")
76
- with gr.Row():
77
- inp_lng = gr.Textbox(label="Longitude", placeholder="e.g. -58.68281")
 
 
78
 
79
  with gr.Row():
80
  btn_run = gr.Button("Run")
@@ -91,11 +93,13 @@ with gr.Blocks() as demo:
91
 
92
  with gr.Tab('DNA Embedding Space Similarity Visualizer'):
93
  gr.Markdown("If the highest genus probability is very low for your DNA sequence, we can still examine the DNA embedding of the sequence in relation to known samples for clues.")
94
- with gr.Column():
95
- gr.Markdown("Plot of your DNA sequence among other known species clusters.")
 
 
96
 
97
- with gr.Column():
98
- gr.Markdown("Plot of the five most common species at your sample coordinate.")
99
 
100
 
101
 
 
1
  import json
2
  import pandas as pd
3
  import gradio as gr
4
+ # from transformers import PreTrainedTokenizerFast, BertForMaskedLM
5
  from datasets import load_dataset
6
  import infer
7
 
 
68
  gr.Markdown("Enter a DNA sequence and the coordinates at which its sample was taken to get a genus prediction. Click 'I'm feeling lucky' to see a prediction for a random sequence.")
69
 
70
  # Collect inputs for app (DNA and location)
71
+ with gr.row():
72
+ with gr.Column():
73
+ inp_dna = gr.Textbox(label="DNA", placeholder="e.g. AACAATGTA... (min 200 and max 660 characters)")
74
+
75
+ with gr.Column():
76
+ with gr.Row():
77
+ inp_lat = gr.Textbox(label="Latitude", placeholder="e.g. -3.009083")
78
+ with gr.Row():
79
+ inp_lng = gr.Textbox(label="Longitude", placeholder="e.g. -58.68281")
80
 
81
  with gr.Row():
82
  btn_run = gr.Button("Run")
 
93
 
94
  with gr.Tab('DNA Embedding Space Similarity Visualizer'):
95
  gr.Markdown("If the highest genus probability is very low for your DNA sequence, we can still examine the DNA embedding of the sequence in relation to known samples for clues.")
96
+
97
+ with gr.Row():
98
+ with gr.Column():
99
+ gr.Markdown("Plot of your DNA sequence among other known species clusters.")
100
 
101
+ with gr.Column():
102
+ gr.Markdown("Plot of the five most common species at your sample coordinate.")
103
 
104
 
105