hra commited on
Commit
ee1e26a
1 Parent(s): 64adf78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -53,7 +53,7 @@ def getstuff(openapikey,category_selector):
53
  answerlist.append(df)
54
  else:
55
  answerlist.append(response.response)
56
-
57
 
58
  return answerlist
59
 
@@ -67,8 +67,8 @@ with gr.Blocks() as demo:
67
  with gr.Column():
68
  textboxopenapi = gr.Textbox(placeholder="Enter OpenAPI Key...", lines=1,label='OpenAPI Key')
69
  category_selector=gr.Dropdown(
70
- listofcategories, label="Sector", info="Select the snapshot you want..."
71
- )
72
  with gr.Column():
73
  btn = gr.Button("Generate")
74
 
@@ -77,8 +77,14 @@ with gr.Blocks() as demo:
77
  outputsector = gr.Textbox(placeholder='', lines=4,label='Snapshot 1')
78
  with gr.Column():
79
  outputtech = gr.Textbox(placeholder='', lines=4,label='Snapshot 2')
 
 
 
 
 
 
80
 
81
- btn.click(getstuff, inputs=[textboxopenapi,category_selector],outputs=[outputsector,outputtech])
82
 
83
 
84
  demo.launch(debug=True)
 
53
  answerlist.append(df)
54
  else:
55
  answerlist.append(response.response)
56
+ answerlist.append(df)
57
 
58
  return answerlist
59
 
 
67
  with gr.Column():
68
  textboxopenapi = gr.Textbox(placeholder="Enter OpenAPI Key...", lines=1,label='OpenAPI Key')
69
  category_selector=gr.Dropdown(
70
+ listofcategories, label="Sector", info="Select the snapshot you want..."
71
+ )
72
  with gr.Column():
73
  btn = gr.Button("Generate")
74
 
 
77
  outputsector = gr.Textbox(placeholder='', lines=4,label='Snapshot 1')
78
  with gr.Column():
79
  outputtech = gr.Textbox(placeholder='', lines=4,label='Snapshot 2')
80
+ with gr.Row() as row:
81
+ table1=gr.Dataframe(
82
+ #headers=["Item", "Cost"],
83
+ datatype=["str", "str","str"],
84
+ label="Snapshot 1",
85
+ )
86
 
87
+ btn.click(getstuff, inputs=[textboxopenapi,category_selector],outputs=[outputsector,outputtech,table1])
88
 
89
 
90
  demo.launch(debug=True)