sms07 commited on
Commit
7a02f02
·
1 Parent(s): 4fbfa7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -49
app.py CHANGED
@@ -109,52 +109,39 @@ topic_model_2_output = topic_model_2.get_topic_info(topic[0])["Representation"][
109
  ]
110
  ###############################################################################
111
 
112
- print()
113
-
114
- print("-" * 150)
115
- print("vqa_pipeline_output = ", vqa_pipeline_output)
116
- print("bbu_pipeline_output =", bbu_pipeline_output)
117
- print("facebook_model_output =", facebook_model_output)
118
- print("gpt2_pipeline_output =", gpt2_pipeline_output)
119
- print("topic_model_1_output =", topic_model_1_output)
120
- print("topic_model_2_output =", topic_model_2_output)
121
-
122
- print()
123
-
124
- print("-" * 150)
125
- print("SUMMARY")
126
- print("-" * 7)
127
- print("Your Image:", image)
128
- print("Your Question:", question)
129
- print("-" * 100)
130
- print(
131
- "1. Highest Predicted Answer For Your Question:",
132
- vqa_pipeline_output["answer"],
133
- "\n",
134
- )
135
- print(text)
136
- print(
137
- "2. Highest Predicted Sequence On [MASK] Based on 1.:",
138
- bbu_pipeline_output[0]["sequence"],
139
- "\n",
140
- )
141
- print(
142
- "3. Conversation Based On Previous Answer Based on 2.:",
143
- facebook_model_output,
144
- "\n",
145
- )
146
- print(
147
- "4. Text Generated Based On Previous Answer Based on 3.:",
148
- gpt2_pipeline_output,
149
- "\n",
150
- )
151
- print(
152
- "5. Highest Predicted Topic Model_1 For Previous The Answer Based on 4.:",
153
- topic_model_1_output,
154
- "\n",
155
- )
156
- print(
157
- "6. Highest Predicted Topic Model_2 For Previous The Answer Based on 4.:",
158
- topic_model_2_output,
159
- )
160
- print("-" * 150)
 
109
  ]
110
  ###############################################################################
111
 
112
+ st.write("-" * 150)
113
+ st.write("vqa_pipeline_output =", vqa_pipeline_output)
114
+ st.write("bbu_pipeline_output =", bbu_pipeline_output)
115
+ st.write("facebook_model_output =", facebook_model_output)
116
+ st.write("gpt2_pipeline_output =", gpt2_pipeline_output)
117
+ st.write("topic_model_1_output =", topic_model_1_output)
118
+ st.write("topic_model_2_output =", topic_model_2_output)
119
+ st.write("-" * 150)
120
+
121
+ st.write("SUMMARY")
122
+ st.subheader("Your Image:")
123
+ st.image(image, caption="Your Image", use_column_width=True)
124
+ st.subheader("Your Question:")
125
+ st.write(question)
126
+ st.write("-" * 100)
127
+
128
+ st.subheader("1. Highest Predicted Answer For Your Question:")
129
+ st.write(vqa_pipeline_output["answer"])
130
+ st.write(text)
131
+
132
+ st.subheader("2. Highest Predicted Sequence On [MASK] Based on 1.:")
133
+ st.write(bbu_pipeline_output[0]["sequence"])
134
+
135
+ st.subheader("3. Conversation Based On Previous Answer Based on 2.:")
136
+ st.write(facebook_model_output)
137
+
138
+ st.subheader("4. Text Generated Based On Previous Answer Based on 3.:")
139
+ st.write(gpt2_pipeline_output)
140
+
141
+ st.subheader("5. Highest Predicted Topic Model_1 For Previous The Answer Based on 4.:")
142
+ st.write(topic_model_1_output)
143
+
144
+ st.subheader("6. Highest Predicted Topic Model_2 For Previous The Answer Based on 4.:")
145
+ st.write(topic_model_2_output)
146
+
147
+ st.write("-" * 150)