ManishThota commited on
Commit
b6b044a
1 Parent(s): f22239e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -7,6 +7,7 @@ import numpy as np
7
  import pandas as pd
8
  import ast
9
  from collections import Counter
 
10
 
11
 
12
  # # Ensure GPU usage if available
@@ -187,6 +188,10 @@ test_examples = [[None, "Images/cat_dog.jpeg", promt_cat_dog],
187
 
188
  def gradio_predict(video,image, question):
189
  answer = predict_answer(video,image, question)
 
 
 
 
190
  # Convert the DataFrame to CSV
191
  output_buffer = BytesIO()
192
  df.to_csv(answer, index=False)
 
7
  import pandas as pd
8
  import ast
9
  from collections import Counter
10
+ from io import BytesIO
11
 
12
 
13
  # # Ensure GPU usage if available
 
188
 
189
  def gradio_predict(video,image, question):
190
  answer = predict_answer(video,image, question)
191
+
192
+ # Convert the dictionary to a DataFrame
193
+ df = pd.DataFrame([answer])
194
+
195
  # Convert the DataFrame to CSV
196
  output_buffer = BytesIO()
197
  df.to_csv(answer, index=False)