codys12 commited on
Commit
60bf6d1
1 Parent(s): bfe89a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -10,12 +10,12 @@ import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
  from peft import PeftModel, PeftConfig
12
 
13
- DESCRIPTION = "This is a conversational interface powered by the MergeLlama-7b model, a finetune of CodeLlama-7b designed to assist developers in resolving merge conflicts in their code. "
14
  DESCRIPTION += "It leverages the capabilities of deep learning to provide suggestions for reconciling code differences, presenting potential resolutions for highlighted changes\n"
15
  DESCRIPTION += "The feedback from this space will help develop future versions including more powerful 13b and 34b versions."
16
 
17
  DESCRIPTION += "\n# How to use: \n"
18
- DESCRIPTION += "1. Input your merge conflict in the chat in the following format:\n```\n<<<<<<<\n[change]\n=======\n[base]\n>>>>>>>\n```\n"
19
  DESCRIPTION += "The model will generate the merge resolution. Context can be added before the conflict and multiple conflicts/resolutions can be chained together for context.\n"
20
  DESCRIPTION += "**Additional Information:**\n"
21
  DESCRIPTION += "- The model behind this tool is based on the MergeLlama dataset, which can be found [here](https://huggingface.co/datasets/codys12/MergeLlama).\n"
@@ -134,10 +134,9 @@ chat_interface = gr.ChatInterface(
134
  ],
135
  stop_btn=None,
136
  examples=[
137
- ["<<<<<<<\n brandPrimary: (Platform.OS === 'ios') ? '#007aff' : '#3F51B5',\n brandInfo: '#5bc0de',\n\n=======\n\n brandPrimary: '#5067FF',\n brandInfo: '#62B1F6',\n\n>>>>>>>"],
 
138
  ["<<<<<<<\n var visibleSets = beatmapSets.Where(s => !s.Filtered).ToList();\n if (!visibleSets.Any())\n return;\n\n=======\n\n var visible = beatmapSets.Where(s => !s.Filtered).ToList();\n if (!visible.Any())\n return false;\n\n>>>>>>>"],
139
- ["<<<<<<<\n// Related to JDK7\nimport java.nio.channels.FileChannel;\n\n=======\n\n// Branch-dependent imports\nimport java.nio.channels.SeekableByteChannel;\n\n>>>>>>>"],
140
- ["<<<<<<<\n bind(BlobDirectoryAccess.class, DefaultBlobDirectoryAccess.class);\n\n=======\n\n bind(new TypeLiteral<UpdateStepRepositoryMetadataAccess<Path>>() {}).to(new TypeLiteral<MetadataStore>() {});\n\n>>>>>>>"],
141
  ],
142
  )
143
 
 
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
  from peft import PeftModel, PeftConfig
12
 
13
+ DESCRIPTION = "# MergeLlama-7b\nThis is a conversational interface powered by the MergeLlama-7b model, a finetune of CodeLlama-7b designed to assist developers in resolving merge conflicts in their code. "
14
  DESCRIPTION += "It leverages the capabilities of deep learning to provide suggestions for reconciling code differences, presenting potential resolutions for highlighted changes\n"
15
  DESCRIPTION += "The feedback from this space will help develop future versions including more powerful 13b and 34b versions."
16
 
17
  DESCRIPTION += "\n# How to use: \n"
18
+ DESCRIPTION += "1. Input your merge conflict in the chat in the following format:\n```\n<<<<<<<\n[Current change]\n=======\n[Incoming change]\n>>>>>>>\n```\n"
19
  DESCRIPTION += "The model will generate the merge resolution. Context can be added before the conflict and multiple conflicts/resolutions can be chained together for context.\n"
20
  DESCRIPTION += "**Additional Information:**\n"
21
  DESCRIPTION += "- The model behind this tool is based on the MergeLlama dataset, which can be found [here](https://huggingface.co/datasets/codys12/MergeLlama).\n"
 
134
  ],
135
  stop_btn=None,
136
  examples=[
137
+ ["<<<<<<<\nlet x = max(y, 11)\n=======\nvar x = max(y, 12, z)\n>>>>>>>"],
138
+ ["class Calculator { \nadd(a, b) {\n return a + b;\n }\n}\n=======\nclass Calculator {\n subtract(a, b) {\n return a - b;\n }\n}\n>>>>>>>"]
139
  ["<<<<<<<\n var visibleSets = beatmapSets.Where(s => !s.Filtered).ToList();\n if (!visibleSets.Any())\n return;\n\n=======\n\n var visible = beatmapSets.Where(s => !s.Filtered).ToList();\n if (!visible.Any())\n return false;\n\n>>>>>>>"],
 
 
140
  ],
141
  )
142