sherpal25 commited on
Commit
7a69293
·
1 Parent(s): b2c36e9

changed the model.

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -3,12 +3,18 @@
3
  # This model is for detecting food in the image.
4
  # Use a pipeline as a high-level helper
5
  from transformers import pipeline
 
 
 
 
 
 
 
 
 
6
 
7
  pipe = pipeline("image-classification", model="microsoft/resnet-50")
8
  result = pipe("./man-holding-banana.jpeg")
9
  print(result[0]['label'])
10
 
11
 
12
- pipe = pipeline("text-generation", model="tiiuae/falcon-7b-instruct", trust_remote_code=True)
13
- result = pipe("what can I make with apple, orange, and potato?")
14
- print("this is the query result.")
 
3
  # This model is for detecting food in the image.
4
  # Use a pipeline as a high-level helper
5
  from transformers import pipeline
6
+ import os
7
+ import openai
8
+
9
+ openai.organization = "org-5Z0c3Uk1VG7t3TsczN6M4FCi"
10
+ #openai.api_key = os.getenv("OPENAI_API_KEY")
11
+ openai.api_key_path ="./key.txt"
12
+ print(openai.api_key)
13
+ print(openai.Model.list())
14
+
15
 
16
  pipe = pipeline("image-classification", model="microsoft/resnet-50")
17
  result = pipe("./man-holding-banana.jpeg")
18
  print(result[0]['label'])
19
 
20